Skip to content

Reduce closed-event logging; code clean-up#385

Merged
ralphbean merged 2 commits intomainfrom
reduce-label-on-close-messages
Oct 24, 2025
Merged

Reduce closed-event logging; code clean-up#385
ralphbean merged 2 commits intomainfrom
reduce-label-on-close-messages

Conversation

@webbnh
Copy link
Copy Markdown
Collaborator

@webbnh webbnh commented Oct 23, 2025

The current code produces a message like

Attempting to update downstream issue on upstream closed event

on basically every downstream update. This is noisy and confusing (since most updates are not a "closed event").

This PR modifies the code to produce that message only if the issue status actually is "Closed".

And, while we're at it, this PR includes a few other clean-ups:

  • Correct type hint references to jira.client which should be jira.client.JIRA
  • Remove the unused downstream parameter from match_user()
  • After hoisting the is-closed test into the caller, tighten up the rest of the code in _update_on_close(), and enhance the log message there.

And, as it happens, this change causes one of the unit tests to fail, so this PR adds a new unit test which correctly represents the original scenario, and this change updates the original test to test the "issue is now closed" scenario. Also, the original test was creating a mock for _update_assignee() which it wasn't referencing, so I added an assertion for it, as well.

@webbnh webbnh force-pushed the reduce-label-on-close-messages branch from 673b0a0 to 89a3568 Compare October 23, 2025 17:10
@webbnh webbnh force-pushed the reduce-label-on-close-messages branch from 89a3568 to e2a3e73 Compare October 23, 2025 17:46
@ralphbean
Copy link
Copy Markdown
Member

Solid, @webbnh. Thanks!

@ralphbean ralphbean enabled auto-merge (rebase) October 23, 2025 19:38
@ralphbean ralphbean merged commit 70efc52 into main Oct 24, 2025
6 checks passed
@ralphbean ralphbean deleted the reduce-label-on-close-messages branch October 24, 2025 18:51
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.

2 participants