Skip to content

Instantly share code, notes, and snippets.

View bozydar's full-sized avatar

Bozydar Sobczak bozydar

  • New Zealand
  • 16:29 (UTC +12:00)
View GitHub Profile
@bozydar
bozydar / prepare-commit-msg
Created June 30, 2021 21:03
Git hook parsing a branch name to get jira number and putting into message
#!/bin/bash
MSG_FILE=$1
branch_name=`git rev-parse --abbrev-ref HEAD`
issue_id=`echo ${branch_name} | grep -o "[0-9]\{4\}"`
# message=`echo ${branch_name} | sed -e 's/[-_]/ /g' -e 's/[0-9]\{4\}//g' -e 's/^[ \t]*//;s/[ \t]*$//'`
# remove all the strings between square brackets
sed -e "s/\[[^]]*]//g" -e 's/^[ \t]*//;s/[ \t]*$//' -i '' $MSG_FILE

Keybase proof

I hereby claim:

  • I am bozydar on github.
  • I am bozydar (https://keybase.io/bozydar) on keybase.
  • I have a public key ASBs4cOFqaAX32egvO-_DSeVTh5wShcYcV0sRVOppwwJHgo

To claim this, I am signing this object:

### Keybase proof
I hereby claim:
* I am bozydar on github.
* I am bozydar (https://keybase.io/bozydar) on keybase.
* I have a public key ASAc8D3-vq-3rTQt5lH9AWpZ-NKQRedVhgZ4eUlYMia9owo
To claim this, I am signing this object:
class BoardingFile < DataPump
input :hash do
record :merchant do
column :name, :validate => {:re => /[A-Z][a-z]+/}
end
records :equipments do
column :id, :validate => {:type => Integer}
column :name, :validate => {:re => /.{,10}/}
end