Fix automatic curl url
@@ -27,7 +27,7 @@ jobs:
PR_NUMBER: ${{ github.event.number }}
EVENT_OBJ: ${{ toJson(github.event) }}
COMMIT_SHA: ${{ github.event.workflow_run.head_sha }}
- REPO_HTML_URL: ${{ github.event.workflow_run.head_repository.html_url }}
+ REPO_NAME: ${{ github.event.workflow_run.head_repository.full_name }}
run: |
echo "github.event.workflow_run.head_sha"
@@ -37,7 +37,7 @@ jobs:
echo "manual curl"
curl -H "Accept: application/vnd.github.groot-preview+json" https://api.github.com/repos/robintibor/braindecode-1/commits/0354654c543c5a17af86dcd1cd0961df9b5dc989/pulls 2>/dev/null | jq '.[0].number'
echo "automated curl"
- curl -H "Accept: application/vnd.github.groot-preview+json" $REPO_HTML_URL/commits/$COMMIT_SHA/pulls 2>/dev/null | jq '.[0].number'
+ curl -H "Accept: application/vnd.github.groot-preview+json" https://api.github.com/repos/$REPO_NAME/commits/$COMMIT_SHA/pulls 2>/dev/null | jq '.[0].number'
echo "steps.set-result.outputs.result"
echo "${{steps.set-result.outputs.result}}"
echo "PULL_NUMBER"
