-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Run release-notes tool only when we actually pull commits into the release branch #1602
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
Run release-notes tool only when we actually pull commits into the release branch #1602
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: roycaihw 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 |
/hold |
/hold cancel |
if ! git diff-index --quiet --cached HEAD; then | ||
util::changelog::update_release_api_version $CLIENT_VERSION $CLIENT_VERSION $new_k8s_api_version | ||
git add . | ||
git commit -m "update changelog with release notes from master branch" |
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.
there is a git add . at line 161 and 164, but there is only one git commit at line 165
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.
yes, the first one allows us to check if there are any staged release note changes, the second one includes the API version update before we commit
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.
if ! git diff-index --quiet --cached HEAD; is not true, then there will be no git commit called. is tht correct?
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.
Yes. ! git diff-index --quiet --cached HEAD
being false means there is nothing to commit, therefore we don't call git commit
also you have two commits in the pr, but looks the 2nd commit has the change for the 1st commit |
They are separate. It would be easier to review if you select "Hide whitespace" on Github (or use |
/lgtm |
What type of PR is this?
/kind bug
Does this PR introduce a user-facing change?
Please review with whitespace changes ignored