Skip to content

Commit 8da41e2

Browse files
author
Ivan De Marino
authored
GH Action to link incoming issues and pull-requests to the Terraform DevEx Team board (#160)
1 parent 6f912e5 commit 8da41e2

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Based on https://github.com/leonsteinhaeuser/project-beta-automations
2+
3+
name: "Add Issues/PRs to TF Provider DevEx team board"
4+
5+
on:
6+
issues:
7+
types: [opened, reopened]
8+
pull_request:
9+
# NOTE: The way content is added to project board is equivalent to an "upsert".
10+
# Calling it multiple times will be idempotent.
11+
types: [opened, reopened, ready_for_review]
12+
13+
jobs:
14+
add-content-to-project:
15+
name: "Add Content to project"
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: "Set Issue to 'Priority = Triage Next'"
19+
uses: leonsteinhaeuser/[email protected]
20+
if: github.event_name == 'issues'
21+
with:
22+
gh_token: ${{ secrets.TF_DEVEX_PROJECT_GITHUB_TOKEN }}
23+
organization: "hashicorp"
24+
project_id: 99 #< https://github.com/orgs/hashicorp/projects/99
25+
resource_node_id: ${{ github.event.issue.node_id }}
26+
operation_mode: custom_field
27+
custom_field_values: '[{\"name\":\"Priority\",\"type\":\"single_select\",\"value\":\"Triage Next\"}]'
28+
- name: "Set Pull Request to 'Priority = Triage Next'"
29+
uses: leonsteinhaeuser/[email protected]
30+
if: github.event_name == 'pull_request'
31+
with:
32+
gh_token: ${{ secrets.TF_DEVEX_PROJECT_GITHUB_TOKEN }}
33+
organization: "hashicorp"
34+
project_id: 99 #< https://github.com/orgs/hashicorp/projects/99
35+
resource_node_id: ${{ github.event.pull_request.node_id }}
36+
operation_mode: custom_field
37+
custom_field_values: '[{\"name\":\"Priority\",\"type\":\"single_select\",\"value\":\"Triage Next\"}]'

0 commit comments

Comments
 (0)