OCPERT-368: Replace GitHub token with Github app for Jira Notificator#1059
OCPERT-368: Replace GitHub token with Github app for Jira Notificator#1059tomasdavidorg wants to merge 3 commits into
Conversation
rh-pre-commit.version: 2.4.0 rh-pre-commit.check-secrets: ENABLED
|
@tomasdavidorg: This pull request references OCPERT-368 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "5.0.0" version, but no target version was set. 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. |
WalkthroughThis pull request migrates NotificationService pre-merge verification from GITHUB_TOKEN authentication to GitHub App authentication. New configuration constants are defined, a GitHubApp abstraction is introduced to manage app authentication and installation-scoped client creation, and NotificationService is updated to initialize and use that abstraction during pre-merge verification workflows. ChangesGitHub App Authentication for Pre-Merge Verification
🎯 3 (Moderate) | ⏱️ ~20 minutes Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error, 1 warning)
✅ Passed checks (13 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@oar/core/github_app.py`:
- Around line 19-22: The code probes private_key with
Path(private_key).is_file(), which can raise OSError when private_key contains
raw PEM text; change the logic in github_app.py to first detect PEM input (e.g.,
private_key.strip().startswith("-----BEGIN")) and treat that as the key content,
otherwise create key_path = Path(private_key).expanduser() and safely call
key_path.is_file() (optionally wrapped in try/except) and read_text() if
present; update the variables referenced (private_key, key_path, key) and the
initialization code that uses them.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 162830bc-9bb2-41a8-b976-a17817486565
📒 Files selected for processing (4)
oar/core/const.pyoar/core/github_app.pyoar/notificator/jira_notificator.pytests/test_jira_notificator.py
rh-pre-commit.version: 2.4.0 rh-pre-commit.check-secrets: ENABLED
rh-pre-commit.version: 2.4.0 rh-pre-commit.check-secrets: ENABLED
|
@tomasdavidorg: all tests passed! Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
|
@coderabbitai help |
ChatThere are 3 ways to chat with CodeRabbit:
CodeRabbit commands
Other keywords and placeholders
Status, support, documentation and community
|
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
|
New PR is opened #1060 |
rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED
https://redhat.atlassian.net/browse/OCPERT-368
Should be merged together with openshift/release#79905
Summary by CodeRabbit
New Features
Chores