Skip to content

Conversation

@Jazzcort
Copy link
Collaborator

Update Jira issue decoding and ownership checks to use the AssignedTeam custom field instead of assignee_email. Add JIRA_JOTNAR_TEAM constant and update related references across supervisor modules.
https://github.com/packit/jotnar/issues/275

Include some string replacement, see commit messages for details.

…ned team

Update Jira issue decoding and ownership checks to use the AssignedTeam
custom field instead of assignee_email. Add JIRA_JOTNAR_TEAM constant and
update related references across supervisor modules.
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly switches the Jira issue ownership logic from using the assignee's email to using the 'AssignedTeam' custom field. This change is consistently applied across the data model, Jira utility functions, and the erratum handler. Additionally, several hardcoded strings have been beneficially replaced with constants from the JiraLabels enum. I've identified one potential issue in the erratum_handler.py file where a Jira component might be getting set to a label value, which could be a copy-paste error and lead to incorrect issue routing.

reporter_email=JIRA_JOTNAR_BOT_EMAIL,
assignee_email=JIRA_JOTNAR_BOT_EMAIL,
labels=[JiraLabels.NEEDS_ATTENTION.value],
components=[JiraLabels.NEEDS_ATTENTION.value],
Copy link
Contributor

Choose a reason for hiding this comment

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

high

It appears there might be a copy-paste error here. The components argument is being set to JiraLabels.NEEDS_ATTENTION.value, which corresponds to the label "jotnar_needs_attention". The original value was "jotnar-package-automation", which is a more conventional name for a Jira component. Using a label value as a component could lead to issues being miscategorized. It would be better to use a dedicated component name, like the original one, or a specific constant if available.

Suggested change
components=[JiraLabels.NEEDS_ATTENTION.value],
components=["jotnar-package-automation"],

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nice catch!

@Jazzcort Jazzcort force-pushed the check-assigned-team-for-jira-issue-ownership branch from 0fd0412 to 26a1b0a Compare November 18, 2025 19:24
…onstants

Replace string-literal Jira labels and bot emails with JiraLabels values and
JIRA_JOTNAR_BOT_EMAIL. Update issue creation and attention-flagging logic to
use centralized constants for improved consistency and maintainability.
@Jazzcort Jazzcort force-pushed the check-assigned-team-for-jira-issue-ownership branch from d6d5083 to d5a3bd1 Compare November 18, 2025 19:26
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.

1 participant