fix: Added all event types that the Python code handles (SRV-214)#127
fix: Added all event types that the Python code handles (SRV-214)#127vsaltxx wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the GitHub Actions workflow to trigger on all issues event types that the sync code supports, to ensure Jira state stays in sync across more issue lifecycle changes.
Changes:
- Expanded
.github/workflows/sync-jira.ymlissues.typesto includeopened,edited,closed,deleted,reopened,labeled, andunlabeled. - Adjusted
handle_issue_closedto avoid updating Jira fields when no Jira issue is returned. - Added a test intended to validate that the workflow triggers on selected issue actions.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
tests/test_sync_issue.py |
Adds a workflow-trigger test that reads the workflow YAML to validate configured issue action types. |
sync_jira_actions/sync_issue.py |
Moves the “set Closed” Jira field update under an issue is not None guard. |
.github/workflows/sync-jira.yml |
Expands workflow triggers for the issues event to include all supported action types. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
aa794b9 to
1e0bd61
Compare
Added Null check
1e0bd61 to
124df8a
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
654db4c to
0f334ee
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… the specific action
11c35cf to
9ea4562
Compare
…es (code-ql.yml, dangerjs.yml, pre-commit.yml, python-test.yml, sync-jira.yml)
ebd4d00 to
389c3ca
Compare
|
I looked through the code and it looks good to me, thank you |
|
This PR is stale because it has been open 30 days with no activity. Remove |
|
This PR was closed because it has been stalled for 10 days with no activity. |
Description
The issues event is configured to trigger only on
opened. It completely missesclosed,reopened,edited,labeled,unlabeled, anddeletedevents.The workflow was newer triggered on
closedevent.Most probably the closed status was synchronised after being triggered on the
issue_commentevent. If someone commented after closing → the workflow ran, the comment synced, but the closed status still never synced. If no one commented → the workflow never ran at all for that issue.Unrelated change: issue.update() was called before the None check, crashing with AttributeError instead of the expected JIRAError. Moved both calls inside the if issue is not None: guard.
Solution
Add all event types that the Python code handles:
opened,edited,closed,deleted,reopened,labeled,unlabeled.The amount of Action run will increase, but the change will not influence the billing since the repo is public.

Related
Fixes: Github resolution status is not reliably synced to Jira (SRV-66)
Testing
Please see added tests.