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

Is it possible to have the actions done as a bot? #212

Open
louim opened this issue Nov 30, 2022 · 3 comments
Open

Is it possible to have the actions done as a bot? #212

louim opened this issue Nov 30, 2022 · 3 comments

Comments

@louim
Copy link

louim commented Nov 30, 2022

Hey! Thanks for creating this action.

I was wondering if it's possible to have the actions (like the commits, branch and comments creation) done as non user? Is there a different token I could use for this?I'm currently using a PAT. I'm trying not to get pinged each time a branch/issue is created 😄

A bit more context, i'm currently using a different token like here https://github.com/github/licensed/blob/31b44067a069b7601060af337d7c27571486728f/.github/workflows/licensed.yml#L53.

@jonabc
Copy link
Contributor

jonabc commented Dec 1, 2022

@louim there is no default token available specifically for this action. That said, you should be able to use any GitHub authorization token that's valid for the actions that you mentioned.

Also, you don't necessarily need to use a custom PAT, ${{ secrets.GITHUB_TOKEN }} may work for your needs. There are [scenarios where the default actions token may not work]https://github.com/jonabc/licensed-ci#authentication), and it looks like I need to update the readme to also call out a limitation from the actions help documentation. If none of those apply to your usage though, you might be ok with GITHUB_TOKEN?

When you use the repository's GITHUB_TOKEN to perform tasks, events triggered by the GITHUB_TOKEN, with the exception of workflow_dispatch and repository_dispatch, will not create a new workflow run. This prevents you from accidentally creating recursive workflow runs. For example, if a workflow run pushes code using the repository's GITHUB_TOKEN, a new workflow will not run even when the repository contains a workflow configured to run when push events occur.

@louim
Copy link
Author

louim commented Dec 1, 2022

@jonabc yeah, sorry I wasn't clear, I'm using a custom PAT to get around the reason you mention (default action token not re-triggering a run).

@jonabc
Copy link
Contributor

jonabc commented Dec 1, 2022

Ah I see. Yeah unfortunately there's no common PAT or other authorization mechanism I'm aware of to bypass notifications when using a PAT on your account. I haven't kept close track of changes or updates to notifications and token usage though, maybe there's something in the help docs?

If not, would creating a helper/bot type user account be an option and using PATs created on the other account to restrict or manage notifications?

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