Skip to content

Commit

Permalink
removed obsolete variable
Browse files Browse the repository at this point in the history
  • Loading branch information
gildas committed Oct 26, 2023
1 parent 7bc412d commit 2105da1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions hooks/common/post-flow-feature-publish
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
branch=$(git rev-parse --abbrev-ref HEAD)
base_branch=$(git config --get gitflow.branch.develop)
origin=$(git config --get remote.origin.url)
userRepo=$(git remote -v | grep grep 'origin\s.*fetch' | awk '{print $2}' | grep "github.com" | cut -d':' -f2 | rev | cut -c5- | rev)

if [[ $origin =~ ^git@github\.com ]]; then
repo=$(echo $origin | sed -e 's/^git@github\.com://' -e 's/\.git$//')
Expand All @@ -18,7 +17,7 @@ if [[ $origin =~ ^git@github\.com ]]; then
# TODO: use --web optionally so the user can edit the PR?!?
else
echo ""
echo "Create PR at: https://github.com/$userRepo/compare/$branch?expand=1"
echo "Create PR at: https://github.com/$repo/compare/$branch?expand=1"
echo "Do not delete the feature branch after the PR is merged. It will be deleted automatically when the feature is finished."
echo ""
fi
Expand Down
3 changes: 1 addition & 2 deletions hooks/common/post-flow-release-publish
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
branch=$(git rev-parse --abbrev-ref HEAD)
base_branch=$(git config --get gitflow.branch.master)
origin=$(git config --get remote.origin.url)
userRepo=$(git remote -v | grep grep 'origin\s.*fetch' | awk '{print $2}' | grep "github.com" | cut -d':' -f2 | rev | cut -c5- | rev)

if [[ $origin =~ ^git@github\.com ]]; then
repo=$(echo $origin | sed -e 's/^git@github\.com://' -e 's/\.git$//')
Expand All @@ -18,7 +17,7 @@ if [[ $origin =~ ^git@github\.com ]]; then
# TODO: use --web optionally so the user can edit the PR?!?
else
echo ""
echo "Create PR at: https://github.com/$userRepo/compare/$branch?expand=1"
echo "Create PR at: https://github.com/$repo/compare/$branch?expand=1"
echo "Do not delete the feature branch after the PR is merged. It will be deleted automatically when the release is finished."
echo ""
fi
Expand Down

0 comments on commit 2105da1

Please sign in to comment.