-
Notifications
You must be signed in to change notification settings - Fork 188
77 lines (71 loc) · 3.13 KB
/
move_issues.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
75
76
77
name: Move Issues
# This workflow transfers or moves issues based upon assigned labels.
# DynamoRevitIssues project https://github.com/orgs/DynamoDS/projects/7
# Built-in workflow https://github.com/orgs/DynamoDS/projects/7/workflows
# The built-in workflow
# - adds any new issues to DynamoRevit Issues project
# - sets status as 'Triage' when an item is added to the project
# - sets status as 'Backlog' when an item is reopened
# - sets status as 'Done' when an item is closed
# This workflow complements the built in workflow and
# - transfers issues labeled as 'Dynamo' to 'DynamoDS/Dynamo' repository
# - transfers issues labeled as 'Wishlist' to 'DynamoDS/DynamoWishlist' repository
# - moves issues labeled as 'tracked' to 'Todo' column the project
# - moves assigned issues to 'In Progress' column the project
on:
issues:
types:
- labeled
- assigned
env:
project_id: 7
project_name: DynamoRevit Issues
jobs:
transfer_issue_labeled_as_dynamo:
name: Transfer issue labeled as Dynamo
runs-on: ubuntu-latest
if: ${{ github.event.action == 'labeled' && github.event.label.name == 'Dynamo' }}
steps:
- name: Transfer issue to Dynamo Repository
env:
GH_TOKEN: ${{ secrets.DYNAMO_ISSUES_TOKEN }}
run: |
gh issue edit ${{ github.event.issue.number }} --remove-project "${{ env.project_name }}" --repo ${{ github.repository }}
gh issue transfer ${{ github.event.issue.number }} DynamoDS/Dynamo --repo ${{ github.repository }}
transfer_issue_labeled_as_wishlist:
name: Transfer issue labeled as Wishlist
runs-on: ubuntu-latest
if: ${{ github.event.action == 'labeled' && github.event.label.name == 'Wishlist' }}
steps:
- name: Transfer issue to DynamoWishlist Repository
env:
GH_TOKEN: ${{ secrets.DYNAMO_ISSUES_TOKEN }}
run: |
gh issue edit ${{ github.event.issue.number }} --remove-project "${{ env.project_name }}" --repo ${{ github.repository }}
gh issue transfer ${{ github.event.issue.number }} DynamoDS/DynamoWishlist --repo ${{ github.repository }}
move_issue_labeled_as_tracked:
name: Move issue labeled as tracked
runs-on: ubuntu-latest
if: ${{ github.event.action == 'labeled' && github.event.label.name == 'tracked' }}
steps:
- name: Move issue to Todo
uses: leonsteinhaeuser/project-beta-automations@v2.2.1
with:
gh_token: ${{ secrets.DYNAMO_ISSUES_TOKEN }}
organization: ${{ github.repository_owner }}
project_id: ${{ env.project_id }}
resource_node_id: ${{ github.event.issue.node_id }}
status_value: Todo
move_assigned_issue:
name: Move assigned issue
runs-on: ubuntu-latest
if: ${{ github.event.action == 'assigned' }}
steps:
- name: Move issue to In Progress
uses: leonsteinhaeuser/project-beta-automations@v2.2.1
with:
gh_token: ${{ secrets.DYNAMO_ISSUES_TOKEN }}
organization: ${{ github.repository_owner }}
project_id: ${{ env.project_id }}
resource_node_id: ${{ github.event.issue.node_id }}
status_value: In Progress