-
Notifications
You must be signed in to change notification settings - Fork 505
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
Improve krel release-notes local k/sig-release repository handling #1126
Improve krel release-notes local k/sig-release repository handling #1126
Conversation
/assign @saschagrunert |
@JamesLaverack -- Have you had a chance to take a took at Sascha's comments? |
b600b76
to
92b7709
Compare
92b7709
to
9b55390
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, can you please squash your commits into one?
I can do. What do you want me to do with the commit messages? I've tried to keep each individual commit logically distinct and correctly commented. Or do you mean to just do a normal squash and keep all the messages in a single commit? |
Yeah I meant one single commit which documents all changes. It’s not that much code so I see no reason to split it up any further. :) |
a91bfc0
to
84c716a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Thank you again!
@JamesLaverack can you please add a release notes block for your changes? :) /kind cleanup |
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
/assign @dougm |
/lgtm |
84c716a
to
b43ac79
Compare
/retest |
This avoids a large category of failure modes where an existing on-disk repository is in an unexpected state. We also delete the repo afterwards to avoid multiple runs filling up the disk. This change therefore removes configuration flags for the fork locations. Also included: * Set the upstream when pushing a new branch * Use HTTP transport for git instead of SSH As we are now using the GitHub token for authentication, we need the HTTP URL and not the SSH one. * Remove check for branch existing on remote The existing code does not work for a number of reasons: - It only checks the default remote, not the user's fork. - Any error returned would be treated as a success, not just a "not found". Even without this check there is no risk, as GitHub will simply reject the pushing of a new branch without `--force`, which we do not use. * Use existing branch if it already exists The `-B` flag to `git checkout` will create the branch if it does not exist (existing beaviour) but will also use it if it does exist.
b43ac79
to
0601453
Compare
Tests are green, nice :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
@justaugustus Could you give this PR your final approval? |
Thanks @JamesLaverack and sorry this one slipped! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JamesLaverack, justaugustus, puerco, saschagrunert The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
A number of changes to allow a user to run the
krel release-notes
multiple times. You'll still get an error if you already have a branch with the expected name on your fork, but it'll correctly manage the local checkout of k/sig-release now, including checking out themaster
branch to apply changes to, setting upstreams when pushing branches, and handling unsaved changes.This also fixes a bug where the command wouldn't work at all as it attempted to use a git repository URL without SSH configuration.