Skip to content
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

Control email of github-actions bot? #41

Closed
mgeisler opened this issue Oct 6, 2024 · 3 comments
Closed

Control email of github-actions bot? #41

mgeisler opened this issue Oct 6, 2024 · 3 comments

Comments

@mgeisler
Copy link

mgeisler commented Oct 6, 2024

Hello! I found this GH action recently and I would love to use it in my repository: google/comprehensive-rust#2396.

However, I've run into a small problem: we use a CLA bot to ensure that we have the correct paperwork for everybody who contributes to the repository. It seems we don't have this for the github-actions user which becomes a co-author of the PR:

image

I will try to talk with the people in Google who maintain the CLA bot about this — I just wanted to note the issue and ask if you perhaps know of a way to control the email address used? Perhaps it would be possible to post the comment as a different user completely?

Ah, reading a bit more lead me to this discussion — the email address used it the same for all actions done by the bot. So I guess this would have to be handled on our side.

@mgeisler
Copy link
Author

mgeisler commented Oct 6, 2024

actions/stale#61 (comment) seems to answer my first question — it would be possible to use a different bot user by changing the token used.

@parkerbxyz parkerbxyz added enhancement New feature or request and removed enhancement New feature or request labels Oct 10, 2024
@parkerbxyz
Copy link
Owner

parkerbxyz commented Oct 10, 2024

it would be possible to use a different bot user by changing the token used

Yes, that's right. The default token used is GITHUB_TOKEN. You can use a different token with the token input. I recommend using a GitHub App token in this case. Here's an example:

jobs:
  suggest-changes:
    runs-on: ubuntu-latest
    steps:
      - name: Generate token
        id: generate-token
        uses: actions/create-github-app-token@v1
        with:
          app-id: ${{ vars.APP_ID }}
          private-key: ${{ secrets.APP_PRIVATE_KEY }}
      - name: Suggest changes
        uses: parkerbxyz/suggest-changes@v1
        with:
          token: ${{ steps.generate-token.outputs.token }}

Let me know if that answers your questions or if you have any additional questions. 🙂

@mgeisler
Copy link
Author

Thanks for the help, I'll talk with our admins to see if I can create and install such an app.

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

No branches or pull requests

2 participants