Skip to content

chore: add jira auto-closing automation - MCP-102 #441

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

Merged
merged 2 commits into from
Aug 12, 2025
Merged

chore: add jira auto-closing automation - MCP-102 #441

merged 2 commits into from
Aug 12, 2025

Conversation

blva
Copy link
Collaborator

@blva blva commented Aug 11, 2025

Proposed changes

  • auto-closes a JIRA if an issue is closed

Checklist

@blva blva marked this pull request as ready for review August 11, 2025 17:53
@Copilot Copilot AI review requested due to automatic review settings August 11, 2025 17:53
@blva blva requested a review from a team as a code owner August 11, 2025 17:53
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds automation to automatically close JIRA tickets when GitHub issues are closed. The workflow monitors GitHub issue events and performs bi-directional synchronization between GitHub and JIRA.

  • Updates the workflow trigger to include closed events
  • Adds a new job to find and close corresponding JIRA tickets when GitHub issues are closed
  • Includes error handling and user feedback via comments

with:
token: ${{ secrets.JIRA_API_TOKEN }}
issue-key: ${{ steps.find_jira.outputs.issue-key }}
transition-id: 1381 # Resolved
Copy link
Preview

Copilot AI Aug 11, 2025

Choose a reason for hiding this comment

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

The transition ID 1381 is a magic number that could vary between JIRA instances or change over time. Consider making this configurable via a repository variable or secret, or add a comment explaining how to determine the correct transition ID for different JIRA setups.

Suggested change
transition-id: 1381 # Resolved
# The transition ID for "Resolved" may vary between JIRA instances.
# Set the JIRA_RESOLVED_TRANSITION_ID repository variable to the correct value for your JIRA project.
# To find the correct transition ID, use the JIRA API or inspect the workflow transitions in your JIRA instance.
transition-id: ${{ vars.JIRA_RESOLVED_TRANSITION_ID }}

Copilot uses AI. Check for mistakes.

uses: mongodb/apix-action/find-jira@v1
with:
token: ${{ secrets.JIRA_API_TOKEN }}
jql: "project = MCP AND description ~ '${{ github.event.issue.html_url }}'"
Copy link
Preview

Copilot AI Aug 11, 2025

Choose a reason for hiding this comment

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

The project name 'MCP' is hardcoded. Consider making this configurable via a repository variable to improve reusability across different projects or JIRA instances.

Suggested change
jql: "project = MCP AND description ~ '${{ github.event.issue.html_url }}'"
jql: "project = ${{ vars.JIRA_PROJECT_KEY }} AND description ~ '${{ github.event.issue.html_url }}'"

Copilot uses AI. Check for mistakes.

@blva blva changed the title chore: add jira auto-closing automation chore: add jira auto-closing automation - MCP-102 Aug 11, 2025
@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 16887939322

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.01%) to 81.751%

Totals Coverage Status
Change from base Build 16877907204: -0.01%
Covered Lines: 3985
Relevant Lines: 4830

💛 - Coveralls

Copy link
Collaborator

@cveticm cveticm left a comment

Choose a reason for hiding this comment

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

LGTM once ci/cd is green

@blva blva enabled auto-merge (squash) August 12, 2025 10:55
@blva blva merged commit d2d935e into main Aug 12, 2025
22 of 23 checks passed
@blva blva deleted the MCP-102 branch August 12, 2025 11:01
kmruiz added a commit that referenced this pull request Aug 13, 2025
chore: first approach to OIDC integration

chore: linter warnings

chore: add jira auto-closing automation - MCP-102 (#441)

chore: add jira auto-closing automation - MCP-102 (#441)

chore: fix apix action version (#448)

chore: fix linter checks

chore: fix tests and eslint config

Ignores any javascript or typescript file that is a test
fixture.

chore: more clean up

chore: add test for token refresh

chore: fix tests and eslint checks
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

Successfully merging this pull request may close these issues.

3 participants