Add atomic PR ID job - Python tool POC#212
Draft
joseph-flinn wants to merge 7 commits into
Draft
Conversation
|
Contributor
There was a problem hiding this comment.
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.
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.
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.



🎟️ 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