Skip to content

Commit

Permalink
fix: actions/github-script requires custom PAT for labelling PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
kelly-sovacool committed Sep 14, 2023
1 parent 7e01f30 commit 063a524
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions .github/workflows/add_reponame_issue_label.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,18 @@
name: Add repo name to issue label

# on:
# workflow_dispatch:

on:
issues:
pull_request:

env:
GH_TOKEN: ${{ secrets.ADD_TO_PROJECT_PAT }}

jobs:

add-label:

runs-on: ubuntu-latest

permissions:
issues: write

steps:

- name: checkout repo
uses: actions/checkout@v4
with:
ref: 'main'
token: ${{ secrets.ADD_TO_PROJECT_PAT }}

- name: add label
uses: actions/github-script@v6
with:
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
script: |
try {
const response = await github.rest.issues.createLabel({
Expand Down

0 comments on commit 063a524

Please sign in to comment.