-
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.4 KB
/
sync-pr-to-issue.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
name: 🔄️Sync PR To Issue
defaults:
run:
shell: pwsh
on:
pull_request_target:
types: opened
issue_comment: # This event is triggered when creating issue and pr comments
types: created
jobs:
initial_sync:
name: Start Initial Sync
if: |
github.event_name == 'pull_request_target' &&
!startsWith(github.base_ref, 'renovate/') &&
github.head_ref != 'prev-release' && github.head_ref != 'prod-release'
uses: KinsonDigital/Infrastructure/.github/workflows/[email protected]
with:
issue-or-pr-number: ${{ github.event.pull_request.number }}
sync-type: initial
requested-by: ${{ github.event.sender.login }}
branch: ${{ github.event.pull_request.head.ref }} # Input not required for initial sync
secrets:
cicd-pat: ${{ secrets.CICD_TOKEN }}
manual_sync:
name: Start Manual Sync
if: |
github.event_name == 'issue_comment' &&
github.head_ref != 'prev-release' && github.head_ref != 'prod-release' &&
contains(github.event.comment.body, '[run-sync]') &&
!startsWith(github.base_ref, 'renovate/')
uses: KinsonDigital/Infrastructure/.github/workflows/[email protected]
with:
issue-or-pr-number: ${{ github.event.issue.number }}
sync-type: manual
requested-by: "validate:${{ github.event.sender.login }}"
secrets:
cicd-pat: ${{ secrets.CICD_TOKEN }}