Skip to content

Commit b73c25b

Browse files
committed
d
1 parent 5303676 commit b73c25b

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

.github/workflows/create-outdated-packages-issue.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ jobs:
3232
- name: check existing issue
3333
run: |
3434
$json = gh issue list --search "in:body *${{ env.REPORT_ID }}*" --repo southworks/botbuilder-js --app github-actions --state open --json id,number,body | ConvertFrom-Json
35-
if($json.body -ne $null) {
36-
echo "ISSUE_NUMBER=$($json.number)" >> "$GITHUB_OUTPUT"
37-
echo "Existing issue #$($json.number) found. Exiting..."
38-
exit 0
35+
if($json.body -eq $null) {
36+
echo "Existing issue #$($json.number) found. Exiting..."
37+
return;
3938
}
4039
$start = $json.body.IndexOf("<!--");
4140
$end = $json.body.IndexOf("-->") + 3;
4241
$header = $json.body.Substring($start, $end - $start)
4342
$hash = $header.Split("hash:")[1].Split("`n")[0].Trim();
43+
echo "ISSUE_NUMBER=$($json.number)" >> "$GITHUB_OUTPUT"
4444
echo "ISSUE_HASH=$hash" >> "$GITHUB_OUTPUT"
4545
shell: pwsh
4646
env:
@@ -53,33 +53,34 @@ jobs:
5353

5454
- name: generate report
5555
run: |
56-
$json = node --experimental-transform-types botframework-sdk/report.ts | ConvertFrom-Json
56+
$json = node --experimental-transform-types report.ts | ConvertFrom-Json
5757
if($json.integrity -eq $env:ISSUE_HASH) {
5858
echo "No changes detected. Exiting..."
59-
exit 0
59+
exit 0;
6060
}
6161
6262
"<!--
63-
${REPORT_ID}
63+
${{ env.REPORT_ID }}
6464
hash:$($json.integrity)
6565
-->
6666
67-
$($json.markdown)" | Out-File botframework-sdk/report.md
68-
Get-Content botframework-sdk/report.md
67+
$($json.markdown)" | Out-File report.md
6968
shell: pwsh
69+
working-directory: ${{ WORKING_DIR }}
7070
env:
7171
ISSUE_HASH: ${{ steps.check-existing-issue.outputs.ISSUE_HASH }}
7272

7373
- name: create/update issue
7474
if: ${{ steps.check-existing-issue.outputs.ISSUE_HASH != '' }}
7575
run: |
76-
$content = Get-Content botframework-sdk/report.md;
76+
$content = Get-Content report.md;
7777
if($env:ISSUE_NUMBER -eq '') {
7878
gh issue create --title "Outdated packages" --body $content --repo $GITHUB_REPOSITORY;
7979
} else {
8080
gh issue edit $env:ISSUE_NUMBER --body $content --repo $GITHUB_REPOSITORY;
8181
}
8282
shell: pwsh
83+
working-directory: ${{ WORKING_DIR }}
8384
env:
8485
GH_TOKEN: ${{ github.token }}
8586
ISSUE: ${{ github.event.issue.html_url }}

botframework-sdk/report.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const result = {
2-
integrity: '123',
2+
integrity: '1234567890',
33
markdown: 'Hello from report.ts'
44
}
55
console.log(JSON.stringify(result));

0 commit comments

Comments
 (0)