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

pull_request_target & permissions #34

Merged
merged 1 commit into from
May 31, 2023
Merged

pull_request_target & permissions #34

merged 1 commit into from
May 31, 2023

Conversation

jmnote
Copy link
Contributor

@jmnote jmnote commented Jan 12, 2023

This PR is relatied to the issue #33

I found a best practice that resolves the issue.
https://github.com/actions/labeler/blob/a11f1c41635ff1796dffb74e7fa24cbcb92f66cf/README.md#create-workflow

The old workflow file no longer works.
To make it work fine, we need to change the event and add some permissions.

name: size-label
## on: pull_request
on: pull_request_target
jobs:
  size-label:
    permissions: ## added
      contents: read
      pull-requests: write
    runs-on: ubuntu-latest
    steps:
      - name: size-label
        uses: "pascalgn/[email protected]"
        env:
          GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

pull_request_target & permissions
@pascalgn pascalgn merged commit b1f4946 into pascalgn:main May 31, 2023
@pascalgn
Copy link
Owner

Thanks for the PR, it's merged now! 👍

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

Successfully merging this pull request may close these issues.

2 participants