-
Notifications
You must be signed in to change notification settings - Fork 27
74 lines (71 loc) · 3.08 KB
/
project-automation.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# This is a basic workflow to help you get started with Actions
name: Project Automation
# Controls when the workflow will run
on:
# Triggers the workflow on issue open events but only for the main branch
issues:
types:
- opened
jobs:
issue-tagging-job-polaris-viz:
runs-on: ubuntu-latest
name: Assign sub-issues with parents label and project
steps:
- uses: actions/checkout@v4
with:
repository: Shopify/analytical-standards-github-actions
ref: v1.7
token: ${{ secrets.PV_ACTION_PAT }} # stored in GitHub secrets
path: .github/actions/analytical-standards-github-actions
- name: 'Label issue if parent contains "polaris-viz" label'
id: issue_labelling
uses: ./.github/actions/analytical-standards-github-actions/issue-labelling
with:
project-label: "polaris-viz"
issue-id: ${{ github.event.issue.number }}
repo-name: ${{ github.event.repository.name }}
repo-owner: ${{ github.event.repository.owner.login }}
stories-label: "Story"
env:
GRAPHQL_API_BASE: "https://api.github.com"
PAT_TOKEN: ${{ secrets.PV_ACTION_PAT }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get the action result
run: echo "AutoLabel Job success ${{ steps.issue_labelling.outputs.success }}"
- name: 'Move issue to "VizX" project'
id: project_next_move
uses: ./.github/actions/analytical-standards-github-actions/issue-to-project
with:
project-label: "polaris-viz"
project-next-number: 3602
organization: "Shopify"
issue-id: ${{ github.event.issue.number }}
repo-name: ${{ github.event.repository.name }}
repo-owner: ${{ github.event.repository.owner.login }}
stories-label: "Story"
env:
GRAPHQL_API_BASE: "https://api.github.com"
PAT_TOKEN: ${{ secrets.PV_ACTION_PAT }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Use the output from the project move step
- name: Get the move result
run: |
echo "Project move job success ${{ steps.project_next_move.outputs.success }}"
echo "The parent milestone was ${{ steps.issue_labelling.outputs.milestoneTitle }}"
echo "The project item Id was ${{ steps.project_next_move.outputs.itemId }}"
- name: issue templating step
id: issue_templating
uses: ./.github/actions/analytical-standards-github-actions/issue-templating
with:
project-label: "polaris-viz"
stories-label: "story"
base-path: './.github/actions/analytical-standards-github-actions/issue-templating'
project-next-number: 3602
issue-id: ${{ github.event.issue.number }}
repo-name: ${{ github.event.repository.name }}
repo-owner: ${{ github.event.repository.owner.login }}
organization: "Shopify"
env:
GRAPHQL_API_BASE: 'https://api.github.com'
PAT_TOKEN: ${{ secrets.PV_ACTION_PAT }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}