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

Enable github actions can create pull requests #911

Closed
marco-ippolito opened this issue Aug 19, 2024 · 6 comments
Closed

Enable github actions can create pull requests #911

marco-ippolito opened this issue Aug 19, 2024 · 6 comments

Comments

@marco-ippolito
Copy link
Member

marco-ippolito commented Aug 19, 2024

I noticed that after the transition to enterprise org, the ability for github actions to create PR has been revoked.
On amaro it fails:
Screenshot 2024-08-19 at 12 49 48

If I try to change at repo level the checkbox is disabled.
Screenshot 2024-08-19 at 12 46 39

I think this has to be changed at organization level https://github.com/enterprises/nodejs/settings/actions

ping @nodejs/tsc

@legendecas
Copy link
Member

Would you mind trying the following settings in the github action yaml (doc)?:

jobs:
  stale:
    runs-on: ubuntu-latest

    permissions:
      issues: write
      pull-requests: write

    steps:
      - uses: actions/stale@v5

@legendecas
Copy link
Member

Related change: nodejs/snap#69

@marco-ippolito
Copy link
Member Author

@aduh95
Copy link
Contributor

aduh95 commented Aug 19, 2024

Alternatively, we could decide write permission is only possible via the bot's account, now that we have a process for it – but that'd be quite a disruptive change, maybe it's more reasonable to simply allow Read and Write permissions for the usual GITHUB_TOKEN.

@legendecas
Copy link
Member

legendecas commented Aug 19, 2024

I found the doc: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#preventing-github-actions-from-creating-or-approving-pull-requests. It is an additional checkbox setting from the default "read" permission.

I think in amaro's case, in order to run test actions on each update pull request as well, you'll need a bot account's token. So I would suggest the process as documented here.

@marco-ippolito
Copy link
Member Author

Fixed #905 (comment)

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

3 participants