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

chore(internal/actions): add touch flag to changefinder #9325

Merged
merged 3 commits into from Jan 29, 2024

Conversation

noahdietz
Copy link
Contributor

If there is a need to force a bump/release of all submodules that changed in a previously submitted change, the -touch flag can be used to append a new line to the submodule CHANGES.md file.

This is best used when comparing already submitted changes. For example, a GAPIC generator change touches every gapic module, but the PR doesn't have nested commits for each changed module. The PR is submitted as is, perhaps because it was included with a bunch of other changes or for timing purposes, and the nested commits were not added with changefinder while the PR was open. In this case, we can do the following using changefinder:

  1. checkout the merged commit with the target changes: git checkout <some commit has>
  2. "save" this to a branch: git checkout -b changed
  3. checkout the commit just before the target commit: git checkout <the commit just before>
  4. "save" this to a branch : git checkout -b base
  5. checkout the changes: git checkout changed
  6. generate the nested commits + touch each module:
go run ./internal/actions/cmd/changefinder -q \
  -format=commit \
  -commit-scope=fix \
  -commit-message="describe the change" \
  -touch
  1. checkout main, new branch, commit:
git checkout main && \
  git checkout -b bump-modules && \
  git commit -a -m 'chore: bump changed modules' && \
  git push

@noahdietz noahdietz requested a review from a team as a code owner January 29, 2024 20:03
@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Jan 29, 2024
Copy link
Member

@quartzmo quartzmo left a comment

Choose a reason for hiding this comment

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

Bravo!!! 🎉

What an excellent PR description! What do you think about adding this stepset to changefinder/README.md? If you're too busy, I'd be happy to do it in a follow-up PR.

@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Jan 29, 2024
@noahdietz
Copy link
Contributor Author

What do you think about adding this stepset to changefinder/README.md?

Sure thing! Done.

@noahdietz noahdietz added the automerge Merge the pull request once unit tests and other checks pass. label Jan 29, 2024
@gcf-merge-on-green gcf-merge-on-green bot merged commit e577006 into googleapis:main Jan 29, 2024
9 checks passed
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants