stan-dev / stan

Stan development repository. The master branch contains the current release. The develop branch contains the latest stable development. See the Developer Process Wiki for details.
https://mc-stan.org
BSD 3-Clause "New" or "Revised" License
2.59k stars 368 forks source link

[CI] Align git author with commiter #3158

Closed serban-nicusor-toptal closed 1 year ago

serban-nicusor-toptal commented 1 year ago

Submission Checklist

Summary

Define git author and committer information as environment variables, removed git config and --author usage, see https://git-scm.com/book/en/v2/Git-Internals-Environment-Variables.

Intended Effect

Fix an issue where a merge is done in CI will be committed by the default git committer, see https://github.com/stan-dev/stan/pull/3153

How to Verify

Break format in this PR and ensure commits come from Stan Jenkins.

Side Effects

None

Documentation

None

Copyright and Licensing

Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company): Toptal

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:

serban-nicusor-toptal commented 1 year ago

@WardBrian I think this PR will solve that issue, the only "problem" is that I'm not entirely sure how to trigger that specific merge to happen to confirm it works ... In theory, the env variables will ensure the correct committer and author are set.

WardBrian commented 1 year ago

I’m also not sure how to cause it - maybe there needs to be a change to develop first which needs to be merged?

I’m happy to just take a best-effort improvement even if we’re not 100% positive it fixed the issue. It wouldn’t make it worse, for sure

serban-nicusor-toptal commented 1 year ago

Oki sounds great, as soon as I have some free time I'll re-open this one since I messed up a lot here. I did go over other repos and stan, math, cmdstan will also require this PR. I'll tag you when ready, thanks for the help!