From 989afa0b93174d9b3bb52c29929d657fd123586e Mon Sep 17 00:00:00 2001 From: James McMullan Date: Mon, 11 Sep 2023 15:19:27 -0400 Subject: [PATCH] HPCC4J-532 Jirabot python scripts - Updated jirabot merge script to trigger on PR close instead of push - Fixed transition message on transition failure Signed-off-by: James McMullan James.McMullan@lexisnexis.com --- .github/workflows/Jirabot.yml | 2 +- .github/workflows/JirabotMerge.yml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Jirabot.yml b/.github/workflows/Jirabot.yml index 89e56efd3..f0b54a23d 100644 --- a/.github/workflows/Jirabot.yml +++ b/.github/workflows/Jirabot.yml @@ -62,7 +62,7 @@ jobs: result += 'Workflow Transition: ' + transition + '\n' except: transitions = jira.transitions(issue) - result += 'Error: Transition: "' + transition + '" failed. Valid transitions=' + transitions + '\n' + result += 'Error: Transition: "' + transition + '" failed. Valid transitions=[' + (', '.join(transitions)) + ']\n' if issue.fields.customfield_10010 is None: issue.update(fields={'customfield_10010': pull_url}) diff --git a/.github/workflows/JirabotMerge.yml b/.github/workflows/JirabotMerge.yml index 67f42b13e..404b48c0a 100644 --- a/.github/workflows/JirabotMerge.yml +++ b/.github/workflows/JirabotMerge.yml @@ -1,7 +1,8 @@ name: Jirabot - Merge on: - push: + pull_request: + types: [closed] branches: - "master" - "candidate-*" @@ -9,6 +10,7 @@ on: jobs: jirabot: runs-on: ubuntu-latest + if: github.event.pull_request.merged == true steps: - uses: "actions/setup-python@v2" with: