[open-tasks]: Show active PRs for each task (#369)#396
Conversation
There was a problem hiding this comment.
Pull request overview
This PR enhances the Open-tasks page generator so each help wanted issue can display any open pull requests that are linked via GitHub’s “auto-close issue” references (e.g., Fixes #N), helping contributors see work already in progress.
Changes:
- Enriches fetched issues with a
linkedPRsfield by querying GitHub GraphQL per issue. - Renders linked PRs under each task as
🔀 #<num> <title> (draft)rows. - Updates/extends unit tests to cover linked PR rendering and PR-node parsing.
Reviewed changes
Copilot reviewed 2 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| tools/generate_open_tasks.py | Adds per-issue GraphQL lookup for linked PRs and renders PR rows in each task section; updates intro copy formatting. |
| tools/test_generate_open_tasks.py | Adds tests for linked PR rendering and GraphQL node parsing; updates an existing assertion for empty sections copy. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@TheCodedKid Hi Samuel! Thanks for the PR. I've made a few notes and will return again when you mark the PR as ready. Btw, I think, pycache should be gitignored. |
yeah i tried adding that to gitignore, that was my bad. |
|
I am going to fix the linting, I agree with that is being said here. Apologizes on that. |
|
Ok, should be fixed, let me know :] |
|
@TheCodedKid #394 introduced some static typing; please rebase your PR. And note the DCO requirement -- please sign your commit using |
Signed-off-by: TheCodedKid <samuel.raumin@gmail.com>
|
Rebased and signed off, lmk |
|
@TheCodedKid I see that the PR is still in draft mode. Is it ready for review? |
|
yes it is! |
|
Ok, cool, will review it today or tomorrow. |
|
@TheCodedKid great, thank you! |
|
@TheCodedKid I have a crazy idea. Sometimes we have open PRs from the community that do not match a specific issue. Take #356, for example. Or flipperdevices/bsb-protobuf#4. It would be great to draw the community's attention to such PRs -- people can help with review, discuss ideas, and so on. Can we filter such PRs by excluding those authored by users who are not members of https://github.com/flipperdevices? What do you think of it all? |
Closes #369
What
Each
help wantedissue on the Open-tasks page now lists the open PRs linked to it, rendered as🔀 #<num> <title> (draft)rows under the task.How
fetch_issues()now enriches each issue with alinkedPRsfield.fetch_linked_prs()runs agh api graphqlquery per issue to get its associated open PRs.render_section()emits a🔀 emojiline per linked PR with a(draft)suffix.Limitations
closedByPullRequestsReferencesonly returns PRs that will auto-close the issue, meaning a PR whose description uses a proper closing keyword, for example:Fixes #N/Closes #N/Resolves #N. So this is only useful if contributors consistently use closing keywords. Catching plain mentions/cross-references would need a timeline/cross-reference query.includeClosedPrs: falsemeans a merged PR drops off the list even if the issue is briefly still open. Self-corrects when the issue closes.Tests
test_generate_page_renders_linked_prs-- covers the🔀row,(draft)suffix, and HTML escaping function.test_fetch_linked_prs_parses_nodes-- mocksghand verifies PR-node parsing plus correctowner/repo/numberargs passed to the GraphQL call.test_fetch_linked_prs_handles_missing_issue--issue: nullyields[]instead of crashing (always have to remind myself of this test).test_generate_page_renders_empty_sections_and_comments_header.Notes