srggrs / assign-one-project-github-action

Automatically add an issue or pull request to specific GitHub Project(s) when you create and/or label them.
MIT License
169 stars 60 forks source link

What are the minimal needed permissions using a PAT #58

Closed service-paradis closed 3 years ago

service-paradis commented 3 years ago

We want to use this action to add PRs from a repo to an organisation project. We want to know what are the minimal permissions needed.

ian-whitestone commented 3 years ago

Related https://github.com/srggrs/assign-one-project-github-action/issues/61

service-paradis commented 3 years ago

secrets.GITHUB_TOKEN is working fine if the project is in the same repo. In our case, we want to use the project at the organisation level. Looks like we need a PAT to make this work.

srggrs commented 3 years ago

I think you need the write:org and read:org for sure, then follow the instructions in https://github.com/srggrs/assign-one-project-github-action#organisation-or-user-project

service-paradis commented 3 years ago

Yes, I can make it works using the instructions. I just wanted to know the minimal required permissions to limit the scope of the PAT.

Thank you for the follow up!

gilgongo commented 3 years ago

@service-paradis

In our case, we want to use the project at the organisation level. Looks like we need a PAT to make this work.

Do you have an example how to use a PAT in the script?

brandonh-msft commented 1 year ago

secrets.GITHUB_TOKEN is working fine if the project is in the same repo. In our case, we want to use the project at the organisation level. Looks like we need a PAT to make this work.

These instructions only say to gen a token - they don't say the scope needed for said token.