File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 1
1
# #### Aggregate Commerce PRs and Issues into a respective Organizational Project #####
2
+ # Security Note: Uses pull_request_target to allow fork PRs to be added to projects
3
+ # This is safe because we only add PRs to projects, no code execution from PRs
2
4
3
5
name : Add pull requests and issues to projects
4
6
10
12
types :
11
13
- opened
12
14
15
+ # Security: Limit permissions to only what's needed
16
+ permissions :
17
+ pull-requests : write
18
+ issues : write
19
+ contents : read
20
+
13
21
jobs :
14
22
call-workflow-add-to-project :
15
23
uses : ./.github/workflows/add-to-project_job.yml
Original file line number Diff line number Diff line change 5
5
6
6
jobs :
7
7
add-to-project :
8
- if : github.event.repository.fork == false
9
8
runs-on : ubuntu-latest
10
9
11
10
steps :
12
11
- name : Add to Commerce PR project
13
12
if : github.event_name == 'pull_request_target'
14
- uses : actions/add-to-project@v0.4.0
13
+ uses : actions/add-to-project@v1.0.2
15
14
with :
16
15
project-url : https://github.com/orgs/AdobeDocs/projects/5 # The organizational project for pull requests
17
16
github-token : ${{ secrets.COMMERCE_PROJECT_AUTOMATION }}
18
17
19
18
- name : Add to Commerce Issue project
20
19
if : github.event_name == 'issues'
21
- uses : actions/add-to-project@v0.4.0
20
+ uses : actions/add-to-project@v1.0.2
22
21
with :
23
22
project-url : https://github.com/orgs/AdobeDocs/projects/6 # The organizational project for issues
24
23
github-token : ${{ secrets.COMMERCE_PROJECT_AUTOMATION }}
You can’t perform that action at this time.
0 commit comments