-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (36 loc) · 1.24 KB
/
move_issue.yaml
File metadata and controls
38 lines (36 loc) · 1.24 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
name: Move issue by labels
on:
issues:
types: [labeled]
jobs:
gitIssueTransfer:
env:
bot_comment: "FYI: @RobertGlobant20/issues_action"
strategy:
matrix:
include:
- label: 'Revit'
repoName: 'issues_action'
- label: 'Advance-Steel'
repoName: 'issues_action2'
- label: 'Wishlist'
repoName: 'issues_action3'
name: Move issues to corresponding repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
#Adds a comment to the issue before moving it
- name: Add comment
if: (github.event.label.name == matrix.label)
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{github.event.issue.number}}
body: ${{ env.bot_comment }}
token: ${{ secrets.DYNAMOBOTTOKEN }}
#Move the issue depending on its labels
- name: (Label ${{ matrix.label }}) Move to ${{ matrix.repoName }}
if: (github.event.label.name == matrix.label)
run: hub issue transfer ${{github.event.issue.number}} ${{matrix.repoName}}
env:
#Uses DYNAMOBOTTOKEN to allow interaction between repos
GITHUB_TOKEN: ${{ secrets.DYNAMOBOTTOKEN }}