From 5b3fc36649217799c2f9d98485aaee0f0835bc9c Mon Sep 17 00:00:00 2001 From: Ian Lewis Date: Thu, 24 Aug 2023 02:56:46 +0000 Subject: [PATCH] Update test issue body Signed-off-by: Ian Lewis --- .github/workflows/pre-submit.units.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pre-submit.units.yml b/.github/workflows/pre-submit.units.yml index 28ad0534..d4f8f4ed 100644 --- a/.github/workflows/pre-submit.units.yml +++ b/.github/workflows/pre-submit.units.yml @@ -273,7 +273,16 @@ jobs: GH_TOKEN: ${{ github.token }} PR_URL: ${{ github.event.pull_request.html_url }} run: | - url=$(gh issue create --title "issue-reopener-basic pre-submit test issue" --body "Test issue for PR ${PR_URL}") + body="" + if [ "${PR_URL}" != "" ]; then + body="Test issue for commit $PR ${PR_URL}" + else + body="Test issue for commit ${GITHUB_SHA}" + fi + body="${body} + - [Workflow run](https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}/attempts/${GITHUB_RUN_ATTEMPT})" + + url=$(gh issue create --title "issue-reopener-basic pre-submit test issue" --body "${body}") echo "${url}" gh issue close "${url}" mkdir test @@ -319,7 +328,16 @@ jobs: GH_TOKEN: ${{ github.token }} PR_URL: ${{ github.event.pull_request.html_url }} run: | - url=$(gh issue create --title "issue-reopener-dry-run pre-submit test issue" --body "Test issue for PR ${PR_URL}") + body="" + if [ "${PR_URL}" != "" ]; then + body="Test issue for commit $PR ${PR_URL}" + else + body="Test issue for commit ${GITHUB_SHA}" + fi + body="${body} + - [Workflow run](https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}/attempts/${GITHUB_RUN_ATTEMPT})" + + url=$(gh issue create --title "issue-reopener-dry-run pre-submit test issue" --body "${body}") echo "${url}" gh issue close "${url}" mkdir test