Skip to content

Assign commits to the standard GitHub Actions bot #1

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 2 commits into from
Mar 14, 2025

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Feb 28, 2025

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

image

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-name and committer-email action inputs.

The inputs are optional, using the GitHub Actions bot account as the default author.

@sebromero
Copy link
Contributor

@per1234 Thank you for your input! What if I make this a configurable parameter? Then we can configure the action to use ArduinoBot for Arduino repositories.

per1234 added 2 commits March 13, 2025 05:50
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.
@per1234 per1234 force-pushed the actions-bot-commit branch from c3ae12a to a702b22 Compare March 13, 2025 12:53
@per1234
Copy link
Contributor Author

per1234 commented Mar 13, 2025

It sounds good @sebromero. I have added the inputs as you proposed:

a702b22 (#1)

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.

Copy link
Contributor

@sebromero sebromero left a comment

Choose a reason for hiding this comment

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

Please see comment

Copy link
Contributor

@sebromero sebromero left a comment

Choose a reason for hiding this comment

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

LGTM

@sebromero sebromero merged commit eb257e0 into arduino:main Mar 14, 2025
1 check passed
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.

2 participants