-
Notifications
You must be signed in to change notification settings - Fork 64
36 lines (35 loc) · 1.25 KB
/
project-board-update.yml
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
name: Set project board status fields
on:
issues:
types:
- labeled
jobs:
update-project-board-fields:
if: github.event.label.name == 'support'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Parse the ticket tracker issue template form
uses: stefanbuck/github-issue-parser@v3
id: issue-parser
with:
template-path: .github/ISSUE_TEMPLATE/5_freshdesk-ticket.yml
- name: Get ticket impact from the form
shell: python
id: get-ticket-impact
run: |
import os
form = ${{ steps.issue-parser.outputs.jsonString }}
impact = form.get("ticket_impact")
# Export the `impact` string to GITHUB_OUTPUT to be used in following steps
with open(os.environ["GITHUB_OUTPUT"], "a") as f :
print(f"impact={impact}", file=f)
- name: Set the "Impact" and "Type" project board fields
uses: EndBug/project-fields@v2
id: set-fields
with:
operation: set
fields: Impact,Type
github_token: ${{ secrets.PROJECT_BOARD_PAT_TOKEN }}
project_url: https://github.com/orgs/2i2c-org/projects/22
values: ${{ steps.get-ticket-impact.outputs.impact }},Support