forked from Automattic/jetpack
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (44 loc) · 1.7 KB
/
issues-to-projects.yml
File metadata and controls
49 lines (44 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Add issues and PRs to Organization Project Board(s),
# based on labels and/or requested reviewers.
#
# Requires a Personal Access Token with the following permissions in a secret PUSH_ISSUES_TO_PROJECTS:
# - repo
# - write:org
# - read:org
#
name: Add issues and PRs to Organization Project Boards
on:
issues:
types: [ opened, edited, reopened, labeled ]
pull_request_target:
types: [ review_requested ]
# map fields with customized labels
env:
pending_review: 👀 Pending review
jobs:
assign_boost_issues:
name: Assign Boost issues to Boost board.
runs-on: ubuntu-latest
if: github.event_name == 'issues'
steps:
# Jetpack Boost: Push to Boost Maintenance Board if labelled "[Plugin] Boost"
- uses: leonsteinhaeuser/project-beta-automations@v1.2.1
if: contains(github.event.issue.labels.*.name, '[Plugin] Boost')
with:
gh_token: ${{ secrets.PUSH_ISSUES_TO_PROJECT_TOKEN }}
organization: 'automattic'
project_id: 322
resource_node_id: ${{ github.event.issue.node_id }}
assign_jarvis_review_prs:
name: Assign PRs where JARVIS is requested as reviewer to the JARVIS board.
runs-on: ubuntu-latest
if: github.event_name == 'pull_request_target' && github.event.action == 'review_requested'
steps:
- uses: leonsteinhaeuser/project-beta-automations@v1.2.1
if: contains(github.event.pull_request.requested_teams, 'Automattic/jarvis-jetpack-quality')
with:
gh_token: ${{ secrets.PUSH_ISSUES_TO_PROJECT_TOKEN }}
organization: 'automattic'
project_id: 424
resource_node_id: ${{ github.event.pull_request.node_id }}
status_value: ${{ env.pending_review }}