Skip to content

Conversation

@susnux
Copy link
Contributor

@susnux susnux commented Feb 28, 2025

The token must have organization permissions to read teams, the github token only has scoped permissions on the repo but not on the org, so we need to use a PAT.

Tested with my PAT ✅

The token must have organization permissions to read teams,
the github token only has scoped permissions on the repo but not on the
org, so we need to use a PAT.

Signed-off-by: Ferdinand Thiessen <[email protected]>
@susnux susnux added 3. to review Waiting for reviews CI labels Feb 28, 2025
if: github.event.pull_request.requested_reviewers[1] == null

permissions:
pull-requests: write
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this is no longer needed, no?
As we now use the PAT permissions.

if: needs.changes.outputs.backend == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.COMMAND_BOT_PAT }}
Copy link
Member

Choose a reason for hiding this comment

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

then we need to restrict it and can not run it for forks...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cannot run it for forks

would be bad. But we either need a PAT or a GitHub App token.
Otherwise we need to choose the CODEOWNERS way.

Copy link
Member

@skjnldsv skjnldsv Feb 28, 2025

Choose a reason for hiding this comment

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

What @nickvergessen means is this I think

      - name: Disabled on forks
        if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
        run: |
          echo 'Can not run this action on forks'
          exit 1

pull-requests: write

steps:
- name: Assign backend engineers
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- name: Assign backend engineers
- name: Disabled on forks
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
run: |
echo 'Can not run this action on forks'
exit 1
- name: Assign backend engineers

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But then this does not make much sense as most PRs we need this come from new community people.
We should probably just add the teams to the codeowners

@susnux susnux added this to the Nextcloud 32 milestone Mar 2, 2025
@skjnldsv skjnldsv deleted the ci/request-reviews-perms branch March 4, 2025 09:42
@skjnldsv skjnldsv modified the milestones: Nextcloud 32, Nextcloud 33 Sep 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants