gajira-find-issue-key icon indicating copy to clipboard operation
gajira-find-issue-key copied to clipboard

Is it planed to find multiple issues ?

Open guillaumewuip opened this issue 5 years ago • 16 comments

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 ?

guillaumewuip avatar Nov 13 '19 19:11 guillaumewuip

Would be nice to have an answer.

tetienne avatar Feb 17 '20 11:02 tetienne

My fork does it: https://github.com/Broadshield/gajira-find-issue-key

jamie-wearsafe avatar Apr 30 '21 04:04 jamie-wearsafe

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 avatar Apr 30 '21 04:04 jamie-wearsafe

@jamie-wearsafe are you planning to open a PR to add this feature to this action?

peimanja avatar May 24 '21 17:05 peimanja

@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 avatar May 24 '21 18:05 jamie-wearsafe

@jamie-wearsafe any chance I can talk you into updating your readme?

ChillyBots avatar Apr 22 '22 07:04 ChillyBots

@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

Justin-JHG avatar Jun 06 '22 13:06 Justin-JHG

@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 avatar Jun 06 '22 13:06 jamie-wearsafe

@jamie-wearsafe wow, thank you for the quick reply, looking forward to hear from you soon :)

Justin-JHG avatar Jun 06 '22 13:06 Justin-JHG

@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 :)

Justin-JHG avatar Jun 06 '22 23:06 Justin-JHG

@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.

jamie-wearsafe avatar Jun 10 '22 16:06 jamie-wearsafe

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)

@jamie-wearsafehttps://urldefense.com/v3/__https://github.com/jamie-wearsafe__;!!MHMB8HWD!V6_NNk_-L_E1mDTxDp8SeD5gO6jSZ0b4sDmo9jmVkSaD7klsP-Vrtp1lC6w-HjS48Hhw6j276soLyD-XHo8YGhhl5w$

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 avatar Jun 11 '22 07:06 Justin-JHG

@Justin-JHG sorry for the delay, its done. Please test if that solves it for you. https://github.com/Broadshield/gajira-find-issue-key

jamie-wearsafe avatar Jul 01 '22 22:07 jamie-wearsafe

5DDFB415-23DA-498D-949A-703169ED8E0B

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?

Justin-JHG avatar Jul 02 '22 09:07 Justin-JHG

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"

oleksiy-nesterov avatar Jan 17 '23 22:01 oleksiy-nesterov

This is an in-house PR, but was abandoned unfortunately.

stodirascu avatar Apr 14 '23 05:04 stodirascu