Skip to content

Commit bdd4cea

Browse files
committed
ci: fix issue status check
For some reason, storing the output of curl into a bash variable breaks UTF-8 encoding. Use a shell pipeline to prevent any encoding from happening. Signed-off-by: Robin Jarry <[email protected]>
1 parent 8534053 commit bdd4cea

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ jobs:
3030

3131
check-commits:
3232
if: ${{ github.event.pull_request.commits }}
33-
runs-on: ubuntu-latest
33+
runs-on: ubuntu-24.04
3434
env:
3535
LYPY_COMMIT_RANGE: "HEAD~${{ github.event.pull_request.commits }}.."
3636
steps:
37-
- run: sudo apt-get install git make
37+
- run: sudo apt-get install git make jq curl
3838
- uses: actions/checkout@v4
3939
with:
4040
fetch-depth: 0

check-commits.sh

+2-3
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,10 @@ err() {
4242
}
4343

4444
check_issue() {
45-
json=$(curl -f -X GET -L --no-progress-meter \
45+
curl -f -X GET -L --no-progress-meter \
4646
-H "Accept: application/vnd.github+json" \
4747
-H "X-GitHub-Api-Version: 2022-11-28" \
48-
"$api_url/issues/${1##*/}") || return 1
49-
test $(echo "$json" | jq -r .state) = open
48+
"$api_url/issues/${1##*/}" | jq -r .state | grep -Fx open
5049
}
5150

5251
for rev in $revisions; do

0 commit comments

Comments
 (0)