Configure git user before Homebrew PR creation #6157
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using
brew bump-formula-pr
to update the cbmc Homebrew Formula,git user credentials are not set, causing commits to be attributed to
"runner". This PR ensures that the name and email are configured prior
to creating version bump PRs for Homebrew.
Hello, Homebrew maintainer here. I've created this PR to ensure that
git
credentials (name and email) are set before usingbrew bump-formula-pr
to update the Homebrew Formula.In PRs such as Homebrew/homebrew-core#78178, we can see that the PR is created by
db-ci-cprover
, but the commit is attributed torunner
(based on the GitHub Actions runner login). This causes a small problem – every time we receive a PR to bumpcbmc
, a Homebrew maintainer has to manually trigger CI to run, asdb-ci-cprover
is recognised as a "First Time Contributor". (This is a consequence of a new GitHub security feature to require approval to run CI for new contributors.)I've used an action authored by the Homebrew organisation and pinned it to a specific commit, to setup the credentials. The action will infer the publicly-available email address for the user (
db-ci-cprover
) using the GitHub API.If using a third-party action doesn't seem like a good option, I'd be happy to discuss alternatives. Thanks!