Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged

Conversation

roycaihw
Copy link
Member

@roycaihw roycaihw commented Oct 26, 2021

What type of PR is this?

/kind bug

Does this PR introduce a user-facing change?

NONE

Please review with whitespace changes ignored

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. labels Oct 26, 2021
@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot requested a review from yliaog October 26, 2021 18:30
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 26, 2021
@roycaihw
Copy link
Member Author

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 26, 2021
@roycaihw
Copy link
Member Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 26, 2021
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"
Copy link
Contributor

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

Copy link
Member Author

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

Copy link
Contributor

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?

Copy link
Member Author

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

@yliaog
Copy link
Contributor

yliaog commented Oct 26, 2021

also you have two commits in the pr, but looks the 2nd commit has the change for the 1st commit

@roycaihw
Copy link
Member Author

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 git diff -w locally)

@yliaog
Copy link
Contributor

yliaog commented Oct 26, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 26, 2021
@k8s-ci-robot k8s-ci-robot merged commit e0e60fa into kubernetes-client:master Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants