Skip to content

Commit 6cbc173

Browse files
authored
github-actions: support gh issues and prs (#2263)
* github-actions: support gh issues and prs see https://docs.github.com/en/webhooks/webhook-events-and-payloads\#pull_request and https://docs.github.com/en/webhooks/webhook-events-and-payloads\#issues * use gh outside of the gh repository context
1 parent ef06a16 commit 6cbc173

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/labeler.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
triage:
1616
runs-on: ubuntu-latest
1717
env:
18-
NUMBER: ${{ github.event.issue.number }}
18+
NUMBER: ${{ github.event.issue.number || github.event.pull_request.number }}
1919
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2020
steps:
2121
- name: Get token
@@ -29,7 +29,7 @@ jobs:
2929
"members": "read"
3030
}
3131
- name: Add agent-python label
32-
run: gh issue edit "$NUMBER" --add-label "agent-python"
32+
run: gh issue edit "$NUMBER" --add-label "agent-python" --repo "${{ github.repository }}"
3333
- id: is_elastic_member
3434
uses: elastic/oblt-actions/github/is-member-of@v1
3535
with:
@@ -38,4 +38,4 @@ jobs:
3838
github-token: ${{ steps.get_token.outputs.token }}
3939
- name: Add community and triage labels
4040
if: contains(steps.is_elastic_member.outputs.result, 'false') && github.actor != 'dependabot[bot]' && github.actor != 'elastic-observability-automation[bot]'
41-
run: gh issue edit "$NUMBER" --add-label "community,triage"
41+
run: gh issue edit "$NUMBER" --add-label "community,triage" --repo "${{ github.repository }}"

0 commit comments

Comments
 (0)