-
Notifications
You must be signed in to change notification settings - Fork 95
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 |
There was a problem hiding this comment.
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.
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 }}'" |
There was a problem hiding this comment.
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.
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.
Pull Request Test Coverage Report for Build 16887939322Details
💛 - Coveralls |
There was a problem hiding this 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
Proposed changes
Checklist