INTEROP-8954: Prepare firewatch for Jira Cloud migration#266
Merged
amp-rh merged 7 commits intoRedHatQE:mainfrom Mar 17, 2026
Merged
INTEROP-8954: Prepare firewatch for Jira Cloud migration#266amp-rh merged 7 commits intoRedHatQE:mainfrom
amp-rh merged 7 commits intoRedHatQE:mainfrom
Conversation
Switch from username-based to accountId-based user identification to support Jira Cloud migration: - Use accountId for @mention syntax ([~accountId:...] format) - Compare comment authors by accountId instead of email - Add _get_user_account_id helper for safe accountId extraction - Add _get_user_email helper with None handling for Cloud privacy - Handle optional assignee_email (may be None in Cloud) Includes 7 unit tests for the new helper methods.
Collaborator
Author
|
Gentle ping — this PR has been open since December 3 and is ready for review. It prepares Jira escalation for the Cloud migration by switching from username-based to accountId-based user identification (required for Jira Cloud). Could a maintainer take a look when available? |
- Switch auth from token_auth (Bearer) to basic_auth (email + API token) to avoid 403 errors on Jira Cloud. Falls back to token_auth when email is not configured, preserving backward compatibility. - Set REST API version to 3 (required for Cloud). - Remove quotes from JQL issue key lookups (Cloud requires unquoted keys for standard fields). - Add --email option to jira-config-gen CLI and config templates. - Update test fixtures: fake server info reports Cloud deployment type, mock HTTP handler matches /search/jql endpoint, e2e fixture uses /rest/api/3/issue. Made-with: Cursor
sg-rh
reviewed
Mar 16, 2026
Replace all issues.stage.redhat.com references with redhat.stage.atlassian.net across CLI help, docstrings, docs, and test fixtures. Made-with: Cursor
Co-authored-by: sg-rh <sgill@redhat.com>
Co-authored-by: sg-rh <sgill@redhat.com>
The accepted suggestions had malformed code (truncated triple-quote with code on the same line). Also reverts the explicit enhanced_search_issues call since python-jira 3.10.5 already auto-routes search_issues() to enhanced_search_issues() on Cloud. Made-with: Cursor
etirta
requested changes
Mar 17, 2026
Cover auth branching (basic_auth vs token_auth), API v3, unquoted JQL epic search, and JiraConfig email rendering. Made-with: Cursor
a1f64ed to
cd09f4d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Prepare firewatch for Jira Cloud migration (INTEROP-8954, INTEROP-8496):
[~accountId:...]mention format)token_auth) to Basic auth (basic_auth) — Bearer with API tokens returns 403 on Cloud--emailoption tojira-config-genCLIChanges by file
src/objects/jira_base.pytoken_authwhen email not configuredsrc/escalation/jira_escalation.pysrc/jira_config_gen/jira_config_gen.pyemailparametersrc/commands/jira_config_gen.py--emailCLI optionsrc/templates/jira.config.j2emailfield when providedtests/e2e/conftest.pyJIRA_EMAILenv var fixture, update API endpoint to v3tests/e2e/templates/jira_configs/jira.config.j2emailfieldtests/unittests/conftest.pyemail+token(Basic auth), search mock handles/search/jqltests/unittests/.../fake_server_info.jsondeploymentType: Cloudtests/unittests/.../test_jira_escalation.pyPagination note
No code changes needed — python-jira 3.10.5 already detects
deploymentType: Cloudand routessearch_issues()toenhanced_search_issues(), which uses the/search/jqlendpoint withnextPageTokenpagination automatically.UAT follow-up
assign_issueemail lookup works in Cloud (src/objects/jira_base.py)get_field("assignee")string output displays correctly in issue tablesJIRA_EMAILenv var is set in CI secrets alongsideJIRA_TOKEN