-
Notifications
You must be signed in to change notification settings - Fork 12
Add atomic PR ID job - Python tool POC #212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 12 out of 15 changed files in this pull request and generated 1 comment.
Files not reviewed (3)
- .github/jobs-py/.env.example: Language not supported
- .github/jobs-py/.gitignore: Language not supported
- .github/jobs-py/shell.nix: Language not supported
Comments suppressed due to low confidence (2)
.github/jobs-py/src/get_pr_id.py:20
- [nitpick] The regex pattern assumes that commit messages contain exactly one PR reference in the format '(#)'. This approach can be brittle if the format changes or if multiple instances appear; consider improving the pattern's robustness or handling multiple matches explicitly.
result = re.search(r"(\(#\d+\))", message)
.github/jobs-py/src/get_pr_id.py:26
- [nitpick] There is no test case that simulates a GithubException being raised (e.g., due to an invalid commit SHA or authentication failure). Adding a unit test for this exception path would improve test coverage.
except GithubException:
|
||
load_dotenv() | ||
|
||
auth = Auth.Token(os.getenv("GITHUB_TOKEN", default="")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using an empty string as the default for GITHUB_TOKEN may result in silent authentication failures. Consider checking whether GITHUB_TOKEN is provided and raising an error if it's missing to avoid ambiguous failures later.
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
🎟️ Tracking
Testing idea of atomic and testable workflow jobs
🚧 Type of change
📔 Objective
Add an atomic job to pull the PR ID that is associated with a commit SHA built in Python with a full suite for testing (POC;: should be thrown out if we want to adopt something like this).
📋 Code changes
📸 Screenshots
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes