NO-JIRA: Refresh list of team members#176
Conversation
Refresh members list, and replace bbennett with core-networking-bot as the new default assignee Signed-off-by: Maayan Friedman <maafried@redhat.com>
WalkthroughThe PR changes the default Jira assignee from ChangesDefault Assignee & Reporting Update
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 12✅ Passed checks (12 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@maayanf24: This pull request explicitly references no jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: maayanf24 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @maayanf24. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
jira-scripts/network_bugs_overview (1)
531-539: ⚡ Quick winUse
get_username_and_usermail_from_assignee(DEFAULT_JIRA_ASSIGNEE)instead of hardcoding the email in the JQL query.
"core-networking-bot@redhat.com"is inlined directly into the query string, while every other place in this file that needs the default assignee's email derives it from the helper (e.g. Lines 249–254, 259–264, 820). IfDEFAULT_JIRA_ASSIGNEEis renamed again, this string will silently fall out of sync and the query will stop returning the right bugs.♻️ Proposed refactor
def retrieve_unassigned_jira_bugs(): clients = init_clients(jira_=True) SDN_OCPBUGS_FILTER = 'project = OCPBUGS AND component in ("Networking / openshift-sdn", "Networking / ovn-kubernetes", "Networking / cloud-network-config-controller", "Networking / ingress-node-firewall", "Networking / cluster-network-operator", "Networking / network-tools")' + _, default_assignee_mail = get_username_and_usermail_from_assignee(DEFAULT_JIRA_ASSIGNEE) query = ( f'(({SDN_OCPBUGS_FILTER}) OR project = RHOCPPRIO AND component in ("networking/sdn") ' "OR project = CORENET AND issuetype = Bug) AND resolution = Unresolved AND ((project = OCPBUGSM OR project = " - 'OCPBUGS) AND assignee = "core-networking-bot@redhat.com" OR project = RHOCPPRIO AND assignee in (' + f'OCPBUGS) AND assignee = "{default_assignee_mail}" OR project = RHOCPPRIO AND assignee in (' '"anbhat@redhat.com", "zshi@redhat.com") OR assignee is EMPTY) ORDER BY Rank DESC' )🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@jira-scripts/network_bugs_overview` around lines 531 - 539, The JQL in retrieve_unassigned_jira_bugs() hardcodes "core-networking-bot@redhat.com"; replace that literal with the default assignee email obtained from get_username_and_usermail_from_assignee(DEFAULT_JIRA_ASSIGNEE) (use the returned email value) so the query uses the canonical DEFAULT_JIRA_ASSIGNEE source; update the query construction in retrieve_unassigned_jira_bugs() to interpolate the helper's email instead of the hardcoded string.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@jira-scripts/network_bugs_overview`:
- Around line 531-539: The JQL in retrieve_unassigned_jira_bugs() hardcodes
"core-networking-bot@redhat.com"; replace that literal with the default assignee
email obtained from
get_username_and_usermail_from_assignee(DEFAULT_JIRA_ASSIGNEE) (use the returned
email value) so the query uses the canonical DEFAULT_JIRA_ASSIGNEE source;
update the query construction in retrieve_unassigned_jira_bugs() to interpolate
the helper's email instead of the hardcoded string.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 54b8851c-2fca-44bc-bb94-7715677bd96c
📒 Files selected for processing (1)
jira-scripts/network_bugs_overview
| f'(({SDN_OCPBUGS_FILTER}) OR project = RHOCPPRIO AND component in ("networking/sdn") ' | ||
| "OR project = CORENET AND issuetype = Bug) AND resolution = Unresolved AND ((project = OCPBUGSM OR project = " | ||
| 'OCPBUGS) AND assignee = "bbennett@redhat.com" OR project = RHOCPPRIO AND assignee in (' | ||
| 'OCPBUGS) AND assignee = "core-networking-bot@redhat.com" OR project = RHOCPPRIO AND assignee in (' |
There was a problem hiding this comment.
let's keep both ben bennett and core-net bot for the interim? so assignee is either of them gets printed...
There was a problem hiding this comment.
I can add bennett email to this query, but the default assignee is used in several other queries as well. It will be easier to re-assign all of them instead of updating the script in multiple places for a temporary situation.
Signed-off-by: Maayan Friedman <maafried@redhat.com>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
jira-scripts/network_bugs_overview (1)
538-541: ⚡ Quick winDerive the default assignee email from
DEFAULT_JIRA_ASSIGNEEand markbbennettas transitional.Two related observations on this query:
- The other unassigned-issue queries (e.g.
get_query_for_unassigned_jira_stories_tracking_github_issues,get_query_for_unresolved_jira_stories_tracking_github_issues) compute the default-assignee email viaget_username_and_usermail_from_assignee(DEFAULT_JIRA_ASSIGNEE). Hardcoding"core-networking-bot@redhat.com"here breaks that pattern, so a future change toDEFAULT_JIRA_ASSIGNEEwill silently miss this query."bbennett@redhat.com"was added per the interim-period discussion in the prior review, but there is no TODO/comment anchoring when it should be removed. Once existing OCPBUGS/OCPBUGSM tickets are reassigned, this entry will quietly start matching nothing useful.♻️ Proposed change
def retrieve_unassigned_jira_bugs(): clients = init_clients(jira_=True) SDN_OCPBUGS_FILTER = 'project = OCPBUGS AND component in ("Networking / openshift-sdn", "Networking / ovn-kubernetes", "Networking / cloud-network-config-controller", "Networking / ingress-node-firewall", "Networking / cluster-network-operator", "Networking / network-tools")' + _, default_assignee_mail = get_username_and_usermail_from_assignee(DEFAULT_JIRA_ASSIGNEE) + # TODO: remove "bbennett@redhat.com" once all OCPBUGS/OCPBUGSM tickets are + # reassigned away from bbennett to core-networking-bot. query = ( f'(({SDN_OCPBUGS_FILTER}) OR project = RHOCPPRIO AND component in ("networking/sdn")) ' - " AND resolution = Unresolved AND ((project = OCPBUGSM OR project = " - 'OCPBUGS) AND assignee in("core-networking-bot@redhat.com","bbennett@redhat.com") OR project = RHOCPPRIO AND assignee in (' - '"anbhat@redhat.com", "zshi@redhat.com") OR assignee is EMPTY) ORDER BY Rank DESC' + f' AND resolution = Unresolved AND ((project = OCPBUGSM OR project = OCPBUGS) ' + f'AND assignee in ("{default_assignee_mail}", "bbennett@redhat.com") ' + f'OR project = RHOCPPRIO AND assignee in ("anbhat@redhat.com", "zshi@redhat.com") ' + f'OR assignee is EMPTY) ORDER BY Rank DESC' )🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@jira-scripts/network_bugs_overview` around lines 538 - 541, The query hardcodes "core-networking-bot@redhat.com" and permanently includes "bbennett@redhat.com"; update the clause to derive the default assignee email using get_username_and_usermail_from_assignee(DEFAULT_JIRA_ASSIGNEE) (same pattern used by get_query_for_unassigned_jira_stories_tracking_github_issues and get_query_for_unresolved_jira_stories_tracking_github_issues) instead of the literal core-networking-bot address, and mark "bbennett@redhat.com" as transitional by adding a TODO comment with the removal condition/timestamp so future reassignment won’t silently become stale; adjust the query string construction around the assignee list in the same block that currently contains SDN_OCPBUGS_FILTER and the OR project = RHOCPPRIO clause.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@jira-scripts/network_bugs_overview`:
- Around line 538-541: The query hardcodes "core-networking-bot@redhat.com" and
permanently includes "bbennett@redhat.com"; update the clause to derive the
default assignee email using
get_username_and_usermail_from_assignee(DEFAULT_JIRA_ASSIGNEE) (same pattern
used by get_query_for_unassigned_jira_stories_tracking_github_issues and
get_query_for_unresolved_jira_stories_tracking_github_issues) instead of the
literal core-networking-bot address, and mark "bbennett@redhat.com" as
transitional by adding a TODO comment with the removal condition/timestamp so
future reassignment won’t silently become stale; adjust the query string
construction around the assignee list in the same block that currently contains
SDN_OCPBUGS_FILTER and the OR project = RHOCPPRIO clause.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 36b97bff-635e-4fae-975d-63892c18d07e
📒 Files selected for processing (1)
jira-scripts/network_bugs_overview
Refresh members list, and replace bbennett with
core-networking-bot as the new default assignee
Summary by CodeRabbit