Skip to content

Commit 06abe78

Browse files
author
l
committed
attempt to get pr number differently
1 parent c5e2f60 commit 06abe78

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.github/workflows/test-sdc-tasks.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,20 @@ jobs:
6060
echo 'testoutput<<EOF' >> $GITHUB_OUTPUT
6161
cat testoutput.txt >> $GITHUB_OUTPUT
6262
echo EOF >> $GITHUB_OUTPUT
63+
- uses: actions/github-script@v7
64+
id: get_pr_data
65+
with:
66+
script: |
67+
return (
68+
await github.rest.repos.listPullRequestsAssociatedWithCommit({
69+
commit_sha: context.sha,
70+
owner: context.repo.owner,
71+
repo: context.repo.repo,
72+
})
73+
).data[0];
6374
- name: make output comment
6475
uses: peter-evans/create-or-update-comment@v5.0.0
6576
with:
66-
issue-number: ${{ github.event.number }}
77+
issue-number: ${{ fromJson(steps.get_pr_data.outputs.result).number }} # ${{ github.event.number }}
6778
body: ${{ steps.read-test-output.outputs.testoutput }}
6879

individual-shell-tools/awk/script-01.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ set -euo pipefail
44

55
# TODO: Write a command to output just the names of each player in `scores-table.txt`.
66
# Your output should contain 6 lines, each with just one word on it.
7-
awk '{print qqqq' scores-table.txt # deliberately break this implementation
7+
awk '{print qqqqa' scores-table.txt # deliberately break this implementation

0 commit comments

Comments
 (0)