Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid the need to have git phr as a configured alias #337

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion bump_packaging
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ fi
git commit -m "Release $FULLVERSION"

if [[ $PACKAGING_PR == true ]] ; then
git phr -m "Release $FULLVERSION" -b "$REMOTE_BRANCH"
# TODO: assumes a remote named whoami for the user's fork
Copy link
Contributor

@wbclark wbclark Jan 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you really want to script this and reduce the amount of assumptions and manual set-up required, our team has been using this ansible role for well over a year to deploy all of the source and tooling repositories used for building hotfix RPMs: theforeman/forklift#1580

I've been using it to manage all of the repositories in my katello devel box for a similar length of time as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a fan of using VMs for those common tasks. It's always awkward when I miss my own customization.

git push --set-upstream "$(whoami)" HEAD
hub pull-request -m "Release $FULLVERSION" -b "$REMOTE_BRANCH"
Comment on lines +55 to +56
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been using gh and there it's gh pr create and it will take care of pushing and everything.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somehow I thought gh was written in Javascript and always ignored it, but now I see it's not and it's even packaged in Fedora. Maybe I'll take some time to look at converting.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm using the Fedora package and it's quite OK for the things I needed it for.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed you often push to the original repository instead of your own fork, which is something I'd like to avoid. Is that because of gh behavior?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, that's my lazyness, you can tell it where to push to. I just often don't even have an own fork (configured)

else
git push "$PACKAGING_GIT_REMOTE" "HEAD:$REMOTE_BRANCH"
fi