gajira-find-issue-key
gajira-find-issue-key copied to clipboard
Is it planed to find multiple issues ?
Thanks for this Github Action!
Is it planed for this actions to find multiple JIRA issues key ?
My use case : Some teams deploy to production by adding a tag on their default branch after having merge multiple PRs. They can link JIRA tickets in the Github Release description or a bot like https://github.com/toolmantim/release-drafter can do it for them. It would be great for this release description to be parsed by gajira-find-issue-key and all JIRA keys found to be returned.
If this is planed or if this is something you're ok to add, how can I help ?
Would be nice to have an answer.
My fork does it: https://github.com/Broadshield/gajira-find-issue-key
As in:
name: Pull Request - Jira Integration
on:
pull_request:
types:
- synchronize
- create
- edit
jobs:
jira_integration:
runs-on: Ubuntu-18.04
env:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
steps:
- uses: actions/checkout@v2
name: Checkout
- name: Atlassian Login
uses: atlassian/gajira-login@master
- name: Get Jira Issues
id: jira
continue-on-error: true
uses: Broadshield/gajira-find-issue-key@master
with:
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN || secrets.GITHUB_TOKEN }}
from: pull_request
returns: all
include-merge-messages: true
generate-github-milestones: true
generate-github-issues: true
standardize-pr-title: true
jira-transition-on-new-branch: in progress
jira-transition-on-pr-open: code review
jira-transition-on-pr-approval: testing
jira-transition-on-pr-merge: testing
jira-transition-chain: triage,to do,solution review,in progress,code review,testing,closed
- name: show outputs
id: b64
run: |
echo "PR Title found: ${{steps.jira.outputs.title}}"
echo "Issues found: ${{steps.jira.outputs.issues}}"
releasenotes=$(printf "Release notes: \n${{steps.jira.outputs.notes}}" | base64)
echo "::set-output name=notes::${releasenotes}"
outputs:
notes: ${{steps.b64.outputs.notes}}
issues: ${{steps.jira.outputs.issues}}
title: ${{steps.jira.outputs.title}}
@jamie-wearsafe are you planning to open a PR to add this feature to this action?
@jamie-wearsafe are you planning to open a PR to add this feature to this action?
I'm not since my fork has had so many additional features added to it.
However I am writing new GitHub Jira actions at the moment in Typescript, which will include handling this Jira issue collection from a branch.
So for now feel free to use my fork, or to fork my fork :)
@jamie-wearsafe any chance I can talk you into updating your readme?
@jamie-wearsafe tried your action and getting following error:
`
Run Broadshield/gajira-find-issue-key@master
with:
from: commits
returns: first
standardize-pr-title: false
generate-github-milestones: false
generate-github-issues: false
`
Error: TypeError: github.GitHub is not a constructor
@jamie-wearsafe
tried your action and getting following error:
Error: TypeError: github.GitHub is not a constructor
Hi, Yes this is due to a change in the octokit version that I haven't yet corrected.
I'll do it now and message you back.
@jamie-wearsafe wow, thank you for the quick reply, looking forward to hear from you soon :)
@jamie-wearsafe tried your action and getting following error:
Error: TypeError: github.GitHub is not a constructor
Hi, Yes this is due to a change in the octokit version that I haven't yet corrected.
I'll do it now and message you back.
@jamie-wearsafe any luck fixing the issue? thanks :)
@jamie-wearsafe
tried your action and getting following error:
Error: TypeError: github.GitHub is not a constructor
Hi, Yes this is due to a change in the octokit version that I haven't yet corrected.
I'll do it now and message you back.
@jamie-wearsafe any luck fixing the issue? thanks :)
Yes, however I've been delayed in testing it and releasing since I've had a work deadline. Sorry. I'll update here when I push the release. It's not far off.
No worries, thank you
Sent from my iPhone
From: Jamie Nelson @.> Sent: Saturday, June 11, 2022 2:27:31 AM To: atlassian/gajira-find-issue-key @.> Cc: Justin Liu-JHG @.>; Comment @.> Subject: Re: [atlassian/gajira-find-issue-key] Is it planed to find multiple issues ? (#4)
tried your action and getting following error:
Error: TypeError: github.GitHub is not a constructor
Hi, Yes this is due to a change in the octokit version that I haven't yet corrected.
I'll do it now and message you back.
@jamie-wearsafehttps://urldefense.com/v3/__https://github.com/jamie-wearsafe__;!!MHMB8HWD!V6_NNk_-L_E1mDTxDp8SeD5gO6jSZ0b4sDmo9jmVkSaD7klsP-Vrtp1lC6w-HjS48Hhw6j276soLyD-XHo8YGhhl5w$ any luck fixing the issue? thanks :)
Yes, however I've been delayed in testing it and releasing since I've had a work deadline. Sorry. I'll update here when I push the release. It's not far off.
— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/atlassian/gajira-find-issue-key/issues/4*issuecomment-1152534837__;Iw!!MHMB8HWD!V6_NNk_-L_E1mDTxDp8SeD5gO6jSZ0b4sDmo9jmVkSaD7klsP-Vrtp1lC6w-HjS48Hhw6j276soLyD-XHo_poTOPRA$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AJ5ZUXSDGZLNDSM4N2TDIS3VONUHHANCNFSM4JNAEPOQ__;!!MHMB8HWD!V6_NNk_-L_E1mDTxDp8SeD5gO6jSZ0b4sDmo9jmVkSaD7klsP-Vrtp1lC6w-HjS48Hhw6j276soLyD-XHo-G1ExB8w$. You are receiving this because you commented.Message ID: @.***>
@Justin-JHG sorry for the delay, its done. Please test if that solves it for you. https://github.com/Broadshield/gajira-find-issue-key
hi @jamie-wearsafe Thank you for the help, I use it as above and now it has no errors but not finding any jira keys?
We need something like this, for example, send all related tasks to testing after merging PR
- name: Find in commit messages
uses: atlassian/gajira-find-issue-key@v3
with:
// example: "ISSUE-0001, ISSUE-0002, ISSUE-0003: minor fixes"
string: ${{ github.event.pull_request.title }}
- name: Transition issue
uses: atlassian/gajira-transition@master
with:
issues: ${{ steps.create.outputs.issues }}
transition: "Ready for QA"
This is an in-house PR, but was abandoned unfortunately.