diff --git a/.github/workflows/full_suite_integration_tests_cron.yml b/.github/workflows/full_suite_integration_tests_cron.yml index 25487cc756..5a2f7b9fbe 100644 --- a/.github/workflows/full_suite_integration_tests_cron.yml +++ b/.github/workflows/full_suite_integration_tests_cron.yml @@ -72,13 +72,13 @@ jobs: - name: Check for opened issues id: check-opened run: | - resp=$(curl -H "Accept: application/vnd.github.v3+json" -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/Flank/flank/issues?creator=github-actions[bot]&state=open&labels=IT_Failed" | jq '.[0] | .number' -r) + resp=$(curl -H "Accept: application/vnd.github.v3+json" -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/${{ github.repository }}/issues?creator=github-actions[bot]&state=open&labels=IT_Failed" | jq '.[0] | .number' -r) echo "::set-output name=issue-number::${resp}" - name: Date of last run id: last-run-date run: | - resp=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/Flank/flank/actions/workflows/it_cron.yml/runs?per_page=2&page=1" | jq ' [.workflow_runs | .[] | select(.status != "in_progress") | select(.conclusion != "cancelled")][0] | .created_at' -r) + resp=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/${{ github.repository }}/actions/workflows/it_cron.yml/runs?per_page=2&page=1" | jq ' [.workflow_runs | .[] | select(.status != "in_progress") | select(.conclusion != "cancelled")][0] | .created_at' -r) echo "::set-output name=last-run-date::${resp}" - name: Create failed message @@ -86,10 +86,10 @@ jobs: run: | echo "### Full suite IT run :x: FAILED :x:" >> message.txt echo "**Timestamp:** ${{ steps.current-time.outputs.formattedTime }}" >> message.txt - echo "**Job run:** [${{ github.run_id }}](https://github.com/Flank/flank/actions/runs/${{ github.run_id }})" >> message.txt + echo "**Job run:** [${{ github.run_id }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> message.txt echo "**Build scan URL:** ${{ needs.run-it-full-suite.outputs.build-scan-url }}" >> message.txt echo "**Commits since the last run:**" >> message.txt - list=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/Flank/flank/commits?since=${{ steps.last-run-date.outputs.last-run-date }}" | jq ' .[] | .sha' -r) + list=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/${{ github.repository }}/commits?since=${{ steps.last-run-date.outputs.last-run-date }}" | jq ' .[] | .sha' -r) if [ -z "$list" ] then echo "No new commits" >> message.txt @@ -97,7 +97,7 @@ jobs: echo "|commit SHA|PR|" >> message.txt echo "|---|:---:|" >> message.txt while IFS= read -r commit; do - resp=$(curl -H "Accept: application/vnd.github.groot-preview+json" -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/Flank/flank/commits/${commit}/pulls" | jq '.[] | {html_url, title}') + resp=$(curl -H "Accept: application/vnd.github.groot-preview+json" -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/${{ github.repository }}/commits/${commit}/pulls" | jq '.[] | {html_url, title}') if [ -z "$resp" ]; then echo "|${commit}|-|" >> message.txt else @@ -111,7 +111,7 @@ jobs: run: | echo "### Full suite IT run :white_check_mark: SUCCEEDED :white_check_mark:" >> message.txt echo "**Timestamp:** ${{ steps.current-time.outputs.formattedTime }}" >> message.txt - echo "**Job run:** [${{ github.run_id }}](https://github.com/Flank/flank/actions/runs/${{ github.run_id }})" >> message.txt + echo "**Job run:** [${{ github.run_id }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> message.txt echo "**Build scan URL:** ${{ needs.run-it-full-suite.outputs.build-scan-url }}" >> message.txt echo "**Closing issue**" >> message.txt