Assign commits to the standard GitHub Actions bot#1
Merged
sebromero merged 2 commits intoarduino:mainfrom Mar 14, 2025
per1234:actions-bot-commit
Merged
Assign commits to the standard GitHub Actions bot#1sebromero merged 2 commits intoarduino:mainfrom per1234:actions-bot-commit
sebromero merged 2 commits intoarduino:mainfrom
per1234:actions-bot-commit
Conversation
Contributor
|
@per1234 Thank you for your input! What if I make this a configurable parameter? Then we can configure the action to use |
The action and reusable workflow commits the generated documentation to the repository. A username and email address must be configured for this commit. Previously, an arbitrary GitHub account was used for this purpose. It is questionable whether it is appropriate to attribute commits to an arbitrary user who didn't make them and which was not explicitly provided for such a purpose. In addition, doing so is problematic because we require all contributors to sign a CLA, and so we would need to set up an exemption for this arbitrary user in order to allow the commits to pass the CLA signing check. So the better approach is to assign the commit to the standard GitHub Actions bot account. This account is already assigned machine generated commits by the infrastructure of several of Arduino's repositories and is already exempted from the CLA check. An alternative would have been to use Arduino's general purpose "ArduinoBot" machine account. This account is assigned automated commits by some infrastructure used exclusively in Arduino's own projects. However, the "arduino/render-docs-github-action" action and reusable workflow may also be used in projects not owned by Arduino, and it probably isn't appropriate to assign commits to ArduinoBot in those repositories.
The users of the action and reusable workflow may wish to attribute commits for the rendered documentation to a specific user. This can now be done via the newly added `committer-name` and `committer-email` action inputs. The inputs are optional, using the GitHub Actions bot account as the default author, as was done before the addition of the inputs.
Contributor
Author
|
It sounds good @sebromero. I have added the inputs as you proposed: While I was working on that, I noticed that I had not updated the commit author data in the duplicated code for the reusable workflow. I have now corrected that omission so the reusable workflow and action are both updated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The action and reusable workflow commits the generated documentation to the repository. A username and email address must be configured for this commit.
Change Default Commit Author
Previously, an arbitrary GitHub account was used for this purpose. It is questionable whether it is appropriate to attribute commits to an arbitrary user who didn't make them and which was not explicitly provided for such a purpose. In addition, doing so is problematic because we require all contributors to sign a CLA, and so we would need to set up an exemption for this arbitrary user in order to allow the commits to pass the CLA signing check.
So the better approach is to assign the commit to the standard GitHub Actions bot account. This account is already assigned machine generated commits by the infrastructure of several of Arduino's repositories and is already exempted from the CLA check:
For example:
https://github.com/arduino/arduino-ide/pull/2597/commits
There is some evidence that this usage of the bot is expected by GitHub:
https://github.com/actions/checkout/blob/main/README.md#push-a-commit-using-the-built-in-token
(there is some interesting related information in actions/checkout#1707)
An alternative would have been to use Arduino's general purpose @ArduinoBot account. This account is assigned automated commits by some infrastructure used exclusively in Arduino's own projects. However, the "arduino/render-docs-github-action" action and reusable workflow may also be used in projects not owned by Arduino, and it probably isn't appropriate to assign commits to ArduinoBot in those repositories.
Make Commit Author Configurable
The users of the action and reusable workflow may wish to attribute commits for the rendered documentation to a specific user. This can now be done via the newly added
committer-nameandcommitter-emailaction inputs.The inputs are optional, using the GitHub Actions bot account as the default author.