Skip to content

Configure git user before Homebrew PR creation #6157

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
merged 1 commit into from
May 28, 2021

Conversation

nandahkrishna
Copy link
Contributor

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.


  • Each commit message has a non-empty body, explaining why the change was made.
  • Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • White-space or formatting changes outside the feature-related changed lines are in commits of their own.

Hello, Homebrew maintainer here. I've created this PR to ensure that git credentials (name and email) are set before using brew 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 to runner (based on the GitHub Actions runner login). This causes a small problem – every time we receive a PR to bump cbmc, a Homebrew maintainer has to manually trigger CI to run, as db-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!

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.
@nandahkrishna nandahkrishna requested a review from a team as a code owner May 27, 2021 16:07
@codecov
Copy link

codecov bot commented May 27, 2021

Codecov Report

Merging #6157 (2bcc2d9) into develop (cf594b8) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #6157   +/-   ##
========================================
  Coverage    74.91%   74.91%           
========================================
  Files         1450     1450           
  Lines       158253   158253           
========================================
  Hits        118550   118550           
  Misses       39703    39703           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c21dfd9...2bcc2d9. Read the comment docs.

@NlightNFotis NlightNFotis merged commit e64fcec into diffblue:develop May 28, 2021
@nandahkrishna nandahkrishna deleted the homebrew-pr-git-config branch May 28, 2021 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants