Skip to content

Instantly share code, notes, and snippets.

View dryaz's full-sized avatar

Dmitrii Riazantsev dryaz

View GitHub Profile
@dryaz
dryaz / createpr.sh
Created June 16, 2023 16:25
Create PR with help of github CLI with body and reviewers
#!/bin/sh
while [[ "$#" -gt 0 ]]; do
case $1 in
-b|--base) baseBranch="$2"; shift ;;
*) echo "Unknown parameter passed: $1"; exit 1 ;;
esac
shift
done
@dryaz
dryaz / commit-msg
Last active December 3, 2019 08:32 — forked from shytikov/commit-msg
commit-msg hook script
#!/bin/sh
#
# Automatically adds branch name and branch description to every commit message.
#
NAME=$(git branch | grep '*' | sed 's/*.*\///')
DESCRIPTION=$(git config branch."$NAME".description)
echo "$NAME: $(cat $1)" > "$1"
if [ -n "$DESCRIPTION" ]
then