Skip to content

Commit

Permalink
HPCC4J-571 Github Action: Jirabot Merge fails to find correct tag (#677)
Browse files Browse the repository at this point in the history
- Added debugging information for action vars
- Add a default Jira URL as a fallback

Signed-off-by: James McMullan [email protected]

Signed-off-by: James McMullan [email protected]
  • Loading branch information
jpmcmu authored Jan 31, 2024
1 parent f743445 commit 7253313
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/JirabotMerge.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
name: Jirabot - Merge

on:
pull_request:
pull_request_target:
types: [closed]
branches:
- "master"
- "candidate-*"

permissions: write-all

jobs:
jirabot:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true
steps:
- name: "Debug Vars"
run: |
echo "JIRA_URL: ${{ vars.JIRA_URL }}"
echo "Pull Request Number: ${{ github.event.pull_request.number }}"
echo "Pull Request Title: ${{ github.event.pull_request.title }}"
echo "Pull Request Author Name: ${{ github.event.pull_request.user.login }}"
echo "Pull Request URL: ${{ github.event.pull_request.html_url }}"
echo "Comments URL: ${{ github.event.pull_request.comments_url }}"
echo "Branch Name: ${{ github.ref_name }}"
- uses: "actions/setup-python@v2"
with:
python-version: "3.8"
Expand Down Expand Up @@ -182,6 +189,11 @@ jobs:
jirabot_user = os.environ['JIRABOT_USERNAME']
jirabot_pass = os.environ['JIRABOT_PASSWORD']
jira_url = os.environ['JIRA_URL']
if not jira_url:
jira_url = 'https://track.hpccsystems.com'
print('Jira URL us empty defaulting to: ' + jira_url)
pr = os.environ['PULL_REQUEST_NUMBER']
title = os.environ['PULL_REQUEST_TITLE']
user = os.environ['PULL_REQUEST_AUTHOR_NAME']
Expand Down

0 comments on commit 7253313

Please sign in to comment.