Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it planed to find multiple issues ? #4

Open
guillaumewuip opened this issue Nov 13, 2019 · 16 comments
Open

Is it planed to find multiple issues ? #4

guillaumewuip opened this issue Nov 13, 2019 · 16 comments

Comments

@guillaumewuip
Copy link

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 guillaumewuip changed the title Is it plan to find multiple issues ? Is it planed to find multiple issues ? Nov 13, 2019
@tetienne
Copy link

Would be nice to have an answer.

@jamie-wearsafe
Copy link

@jamie-wearsafe
Copy link

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}}

@peimanja
Copy link

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

@jamie-wearsafe
Copy link

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

@ChillyBots
Copy link

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

@Justin-JHG
Copy link

Justin-JHG commented Jun 6, 2022

@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
Copy link

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

@Justin-JHG
Copy link

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

@Justin-JHG
Copy link

@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
Copy link

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

@Justin-JHG
Copy link

Justin-JHG commented Jun 11, 2022 via email

@jamie-wearsafe
Copy link

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

@Justin-JHG
Copy link

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?

@oleksiy-nesterov
Copy link

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"

@stodirascu
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants