Skip to content

Commit cc111c9

Browse files
author
l
committed
labelling pr
1 parent 377fc23 commit cc111c9

File tree

2 files changed

+43
-22
lines changed

2 files changed

+43
-22
lines changed

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

Lines changed: 42 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
name: Test SDC Tasks
22

33
on:
4-
push:
4+
# push:
5+
# paths:
6+
# - 'individual-shell-tools/**.sh'
7+
# - 'shell-pipelines/**.sh'
8+
# - 'jq/*.sh'
9+
pull_request:
510
paths:
611
- 'individual-shell-tools/**.sh'
712
- 'shell-pipelines/**.sh'
813
- 'jq/*.sh'
9-
pull_request_target:
10-
types:
11-
- labeled
12-
- unlabeled
13-
- opened
14-
- edited
15-
- reopened
14+
# pull_request_target:
15+
# types:
16+
# - labeled
17+
# - unlabeled
18+
# - opened
19+
# - edited
20+
# - reopened
1621

1722
jobs:
1823
test_sdc_tasks:
@@ -60,20 +65,36 @@ jobs:
6065
echo 'testoutput<<EOF' >> $GITHUB_OUTPUT
6166
cat testoutput.txt >> $GITHUB_OUTPUT
6267
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];
68+
# - uses: actions/github-script@v7
69+
# id: get_pr_data
70+
# with: # this isn't going to work with a fork pr
71+
# script: |
72+
# return (
73+
# await github.rest.repos.listPullRequestsAssociatedWithCommit({
74+
# commit_sha: context.sha,
75+
# owner: context.repo.owner,
76+
# repo: context.repo.repo,
77+
# })
78+
# ).data[0];
7479
- name: make output comment
7580
uses: peter-evans/create-or-update-comment@v5.0.0
7681
with:
77-
issue-number: ${{ fromJson(steps.get_pr_data.outputs.result).number }} # ${{ github.event.number }}
82+
issue-number: ${{ github.event.number }} # ${{ fromJson(steps.get_pr_data.outputs.result).number }}
7883
body: ${{ steps.read-test-output.outputs.testoutput }}
79-
84+
- uses: actions/github-script@v7
85+
id: update-labels
86+
if: contains(steps.read-test-output.outputs.testoutput, 'complete!')
87+
with:
88+
script: |
89+
await github.rest.issues.addLabels({
90+
owner: context.repo.owner,
91+
repo: context.repo.repo,
92+
issue_number: ${{ github.event.number }},
93+
labels: ["Complete"]
94+
});
95+
await github.rest.issues.removeLabel({
96+
owner: context.repo.owner,
97+
repo: context.repo.repo,
98+
issue_number: ${{ github.event.number }},
99+
name: "Needs Review"
100+
});

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 qqqqaaaa' scores-table.txt # deliberately break this implementation
7+
awk '{print $1}' scores-table.txt # deliberately break this implementation

0 commit comments

Comments
 (0)