-
-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (43 loc) · 1.45 KB
/
sync-bot.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
name: 🤖Sync Bot
defaults:
run:
shell: pwsh
on:
issues:
types: [labeled, unlabeled, assigned, unassigned, milestoned, demilestoned]
jobs:
sync_bot:
name: Sync Bot Status Check
if: ${{ !github.event.issue.pull_request }}
runs-on: ubuntu-latest
steps:
- name: Set Up Deno
if: startsWith(github.ref_name, 'feature/')
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Run Sync Bot (Issue Change)
if: startsWith(github.ref_name, 'feature/')
run: |
$scriptUrl = "${{ vars.SCRIPT_BASE_URL }}/${{ vars.CICD_SCRIPTS_VERSION }}/${{ vars.SCRIPT_RELATIVE_DIR_PATH}}/sync-bot-status-check.ts";
$issueNumber = "${{ github.event.issue.number }}";
Write-Host "::notice::Project Name: ${{ vars.PROJECT_NAME }}";
Write-Host "::notice::Issue: $issueNumber";
if ($manuallyExecuted -and $issueNumber -eq "0") {
Write-Host "::error::The issue or PR number must be a value greater than 0.";
exit 1;
}
<# Deno Args:
1. Organization name
2. Project name
3. Issue number
4. Event Type - set to issue event type
5. PAT
#>
deno run `
--allow-net `
"$scriptUrl" `
"${{ vars.PROJECT_NAME }}" `
"$issueNumber" `
"issue" `
"${{ secrets.CICD_TOKEN }}";