Skip to content

Commit 4c1ae74

Browse files
authored
Change some workflows using pull_request to use pull_request_target instead (#112161)
* Change workflows to use pull_request_target instead of pull_request event * Add CODEOWNERS entry * Add initial readme
1 parent 9699929 commit 4c1ae74

4 files changed

Lines changed: 11 additions & 4 deletions

File tree

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,4 @@
112112
/docs/area-owners.* @jeffhandley
113113
/docs/issue*.md @jeffhandley
114114
/.github/policies/ @jeffhandley @mkArtakMSFT
115+
/.github/workflows/ @dotnet/runtime-infrastructure

.github/workflows/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Workflows
2+
3+
General guidance:
4+
5+
- Please make sure to include the @dotnet/runtime-infrastructure group as a reviewer of your PRs.
6+
- Do not use the `pull_request` event. Use `pull_request_target` instead, as documented in [Workflows in forked repositories](https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#workflows-in-forked-repositories) and [pull_request_target](https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request_target).

.github/workflows/check-no-merge-label.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ permissions:
44
pull-requests: read
55

66
on:
7-
pull_request:
8-
types: [opened, edited, reopened, labeled, unlabeled, synchronize]
7+
pull_request_target:
8+
types: [labeled, unlabeled]
99
branches:
1010
- 'main'
1111
- 'release/**'

.github/workflows/check-service-labels.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ permissions:
44
pull-requests: read
55

66
on:
7-
pull_request:
8-
types: [opened, edited, reopened, labeled, unlabeled, synchronize]
7+
pull_request_target:
8+
types: [labeled, unlabeled]
99
branches:
1010
- 'release/**'
1111

0 commit comments

Comments
 (0)