Skip to content

Add branch/type filters to transitions and dict-based fixVersion mapping#460

Merged
ralphbean merged 8 commits into
release-engineering:mainfrom
istein1:feature/branch-and-type-filtered-transitions
May 20, 2026
Merged

Add branch/type filters to transitions and dict-based fixVersion mapping#460
ralphbean merged 8 commits into
release-engineering:mainfrom
istein1:feature/branch-and-type-filtered-transitions

Conversation

@istein1
Copy link
Copy Markdown
Contributor

@istein1 istein1 commented Apr 25, 2026

Summary

  • Add branches (glob) and issue_types filters to PR transition configs, so transitions only fire for matching branches and Jira issue types
  • Add issue_types filter support to issue transition configs
  • Support dict-based fixVersion mapping (in addition to existing string template format)
  • Add base_branch field to PR intermediary, extracted from GitHub PR payload
  • Add comprehensive tests for all new filtering and mapping logic

Test plan

  • Table-driven tests for _update_transition with issue_types filtering (7 scenarios)
  • Tests for PR branch filter match/no-match
  • Tests for PR issue type filter match/no-match
  • Test for multiple transition entries selecting the correct match
  • Table-driven tests for map_fixVersion (string template + dict lookup)
  • End-to-end test for dict-based fixVersion mapping through Issue.from_github

🤖 Generated with Claude Code

…rsion mapping, and tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@istein1 istein1 requested review from Zyzyx and ralphbean as code owners April 25, 2026 20:26
Ilanit Stein and others added 2 commits April 26, 2026 09:27
@webbnh
Copy link
Copy Markdown
Collaborator

webbnh commented Apr 27, 2026

/ok-to-test

webbnh

This comment was marked as resolved.

@istein1
Copy link
Copy Markdown
Contributor Author

istein1 commented Apr 28, 2026

Thank you @webbnh,
Really appreciate your thorough review.
I'll work on addressing all the mentioned points.

Ilanit Stein and others added 2 commits May 1, 2026 17:22
- Guard noisy log in update_transition when pr_updates is absent
- Simplify base_branch extraction with dict reference instead of .get()
- Split PR filter tests into separate units for _matches_transition_filters
  and update_transition
- Add missing issue test scenarios: absent/empty issue_updates, none-match
  multiple entries, already-matching status, transition=True
- Fix misleading "cumulative" comment in issue test docstring
- Document branches, issue_types filters and dict-based fixVersion mapping

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace `closed_status is not True` with `isinstance(closed_status, str)`
  to safely skip any non-string value (True, False, None, etc.)
- Show branches/issue_types as keys in the same dict in pr_updates docs
- Add test scenario for transition: False

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@istein1
Copy link
Copy Markdown
Contributor Author

istein1 commented May 4, 2026

@webbnh ,Thanks for the detailed feedback!
I’ve pushed updates to address all the comments above.
Could you take another look and let me know if these changes satisfy your requirements,
or if there’s anything else I should polish?

@webbnh
Copy link
Copy Markdown
Collaborator

webbnh commented May 4, 2026

/ok-to-test

webbnh

This comment was marked as resolved.

…ormalize transition True

- Consolidate merge_transition and issue_updates transition doc entries
  into single entries showing optional filters, per reviewer suggestion
- Fix mapping array description wording
- Normalize legacy transition: True to "Closed" (confirmed by Ralph)
- Update test expectation for True normalization

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@istein1
Copy link
Copy Markdown
Contributor Author

istein1 commented May 10, 2026

Thanks for the review @webbnh ,
Fixed the Docs comments, Normalized legacy transition: True to "Closed" (confirmed by Ralph),
and updated test expectation for True normalization.

@webbnh
Copy link
Copy Markdown
Collaborator

webbnh commented May 11, 2026

/ok-to-test

webbnh

This comment was marked as resolved.

…add malformed config warning

Use CUSTOM_TRANSITION placeholder in pr_updates doc example for
consistency, and log a warning when a non-string transition value
is encountered in issue_updates config.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@istein1
Copy link
Copy Markdown
Contributor Author

istein1 commented May 15, 2026

@webbnh , Any further changes needed?

Copy link
Copy Markdown
Collaborator

@webbnh webbnh left a comment

Choose a reason for hiding this comment

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

/lgtm
/ok-to-test

@webbnh
Copy link
Copy Markdown
Collaborator

webbnh commented May 15, 2026

/ok-to-test

@istein1
Copy link
Copy Markdown
Contributor Author

istein1 commented May 18, 2026

Hi @ralphbean and @Zyzyx ,
Would you please review / merge?

@ralphbean ralphbean enabled auto-merge (squash) May 20, 2026 17:10
@ralphbean
Copy link
Copy Markdown
Member

/ok-to-test

@ralphbean ralphbean merged commit 8ca9df6 into release-engineering:main May 20, 2026
8 checks passed
@istein1 istein1 deleted the feature/branch-and-type-filtered-transitions branch May 20, 2026 18:42
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