Skip to content

Conversation

@slokie-so
Copy link
Contributor

@slokie-so slokie-so commented Mar 17, 2025

Allows Issues to be forwarded directly to Jira for team consumption

Summary by CodeRabbit

  • Chores
    • Automated internal issue tracking workflow. When GitHub issues are labeled as "ticketed," the system automatically creates corresponding Jira tickets. Bugs and enhancements are properly categorized with links back to the original GitHub issues for improved traceability and streamlined development processes.

✏️ Tip: You can customize this high-level summary in your review settings.

@slokie-so slokie-so added the enhancement New feature or request label Mar 17, 2025
@slokie-so slokie-so self-assigned this Mar 17, 2025
@coderabbitai
Copy link

coderabbitai bot commented Jan 20, 2026

Walkthrough

A new GitHub Actions workflow is introduced to automatically create Jira issues when GitHub issues are labeled "ticketed." The workflow conditionally creates Bug or Product Feature issues in Jira project BP based on GitHub issue labels, with automatic cross-linking between platforms.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow
.github/workflows/jira-issue-transfer.yml
New workflow file for automating Jira issue creation on labeled GitHub issues. Authenticates to Jira and creates conditional issues (Bug or Product Feature) in project BP based on issue labels, with GitHub issue details and cross-reference links.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A ticket springs to life with care,
When labels dance through the GitHub air,
To Jira's home it makes its way,
Bug or feature, come what may,
Automation hops throughout the day! 🎫

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: introducing a new workflow to transfer GitHub issues to Jira, which is the primary purpose of the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.github/workflows/jira-issue-transfer.yml:
- Around line 34-54: The two workflow steps "Jira Create Bug" (id: bug) and
"Jira Create Enhancement" (id: enhancement) can both run when an issue has both
labels; update the step conditions to make them mutually exclusive (e.g., change
the bug step's if to check for 'bug' and NOT 'enhancement', and change the
enhancement step's if to check for 'enhancement' and NOT 'bug'), or
alternatively add a comment above the steps documenting that creating both Jira
issues is intentional; edit the if expressions on the steps (referencing ids bug
and enhancement) to implement the chosen behavior.
🧹 Nitpick comments (3)
.github/workflows/jira-issue-transfer.yml (3)

22-25: Job name build is misleading.

Consider renaming to something descriptive like create-jira-issue or transfer-to-jira to better reflect the workflow's purpose.

 jobs:
-  build:
+  create-jira-issue:
     runs-on: self-hosted
     if: github.event.label.name == 'ticketed'

27-33: GITHUB_TOKEN appears unnecessary for Jira login.

The atlassian/gajira-login action only requires Jira credentials (JIRA_BASE_URL, JIRA_USER_EMAIL, JIRA_API_TOKEN). The GITHUB_TOKEN can be removed from this step unless you have a specific use case requiring it.

         - name: Login
           uses: atlassian/gajira-login@v3
           env:
             JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
             JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
             JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
-            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

43-54: Consider adding a step to comment the Jira issue link back on the GitHub issue.

The gajira-create action outputs the created issue key via steps.<id>.outputs.issue. Adding a comment to the GitHub issue with the Jira link improves cross-platform traceability.

Example step to add after each creation
        - name: Comment Jira Link on GitHub Issue
          if: steps.bug.outputs.issue || steps.enhancement.outputs.issue
          uses: peter-evans/create-or-update-comment@v5
          with:
            issue-number: ${{ github.event.issue.number }}
            body: |
              Jira issue created: ${{ secrets.JIRA_BASE_URL }}/browse/${{ steps.bug.outputs.issue || steps.enhancement.outputs.issue }}

Comment on lines +34 to +54
- name: Jira Create Bug
id: bug
if: contains(github.event.issue.labels.*.name, 'bug')
uses: atlassian/gajira-create@v3
with:
project: BP
issuetype: 'Bug Report'
summary: ${{ github.event.issue.title }}
description: "Github Issue Link: ${{ github.event.issue.html_url}} \r\n ${{ github.event.issue.body }}"
fields: '{"labels":["GitHubReport"]}'

- name: Jira Create Enhancement
id: enhancement
if: contains(github.event.issue.labels.*.name, 'enhancement')
uses: atlassian/gajira-create@v3
with:
project: BP
issuetype: 'Product Feature'
summary: ${{ github.event.issue.title }}
description: "Github Issue Link: ${{ github.event.issue.html_url}} \r\n ${{ github.event.issue.body }}"
fields: '{"labels":["GitHubReport"]}'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Potential duplicate Jira issues when both bug and enhancement labels are present.

If a GitHub issue has both labels, both the "Jira Create Bug" and "Jira Create Enhancement" steps will execute, creating two separate Jira issues. If this is unintended, consider making the conditions mutually exclusive:

         - name: Jira Create Bug
           id: bug
           if: contains(github.event.issue.labels.*.name, 'bug') 
           uses: atlassian/gajira-create@v3
           ...

         - name: Jira Create Enhancement
           id: enhancement
-          if: contains(github.event.issue.labels.*.name, 'enhancement')
+          if: contains(github.event.issue.labels.*.name, 'enhancement') && !contains(github.event.issue.labels.*.name, 'bug')
           uses: atlassian/gajira-create@v3 

Alternatively, if creating both is intentional, a brief comment documenting this behavior would be helpful.

🤖 Prompt for AI Agents
In @.github/workflows/jira-issue-transfer.yml around lines 34 - 54, The two
workflow steps "Jira Create Bug" (id: bug) and "Jira Create Enhancement" (id:
enhancement) can both run when an issue has both labels; update the step
conditions to make them mutually exclusive (e.g., change the bug step's if to
check for 'bug' and NOT 'enhancement', and change the enhancement step's if to
check for 'enhancement' and NOT 'bug'), or alternatively add a comment above the
steps documenting that creating both Jira issues is intentional; edit the if
expressions on the steps (referencing ids bug and enhancement) to implement the
chosen behavior.

@rvazarkar rvazarkar merged commit bcf6de5 into main Jan 20, 2026
11 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants