Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

Commit 246cab9

Browse files
Fix token related error while adding PR comment
https://github.com/splunk/public-o11y-docs/actions/runs/15490506134 - add label on PR from forked repositories branches - add comment on PR from splunk/public-o11y-docs branch
1 parent f5876de commit 246cab9

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/heretto-reminder.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,20 @@ jobs:
1717

1818

1919
steps:
20+
- name: Add PR label
21+
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
22+
uses: actions/github-script@v7
23+
with:
24+
github-token: ${{ secrets.GITHUB_TOKEN }}
25+
script: |
26+
github.rest.issues.addLabels({
27+
issue_number: context.issue.number,
28+
owner: context.repo.owner,
29+
repo: context.repo.repo,
30+
labels: ['heretto']
31+
})
2032
- name: Add PR Comment
33+
if: ${{ github.head_ref == 'repo-sync' }}
2134
uses: actions/github-script@v6
2235
with:
2336
github-token: ${{ secrets.MY_TOKEN }}

0 commit comments

Comments
 (0)