Show unlinked community PRs on the Open-tasks page (#409)#412
Conversation
|
Let me know what you all think :] |
There was a problem hiding this comment.
Pull request overview
Adds support to the Open-tasks generator to surface “unlinked community PRs” (open PRs in Flipper One sub-project repos that aren’t associated with an issue), and renders them as a new section on the Open-tasks page.
Changes:
- Extend
tools/generate_open_tasks.pywith community PR fetching/filtering (community author + no linked issue) and template rendering data preparation. - Update
tools/templates/open_tasks.md.j2to render a new Community pull requests section when results exist. - Add unit tests covering community PR filtering, linked-issue detection, rendering/escaping, and empty-section omission.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tools/generate_open_tasks.py | Fetches and filters community PRs, checks linked issues via GraphQL, and passes display-ready PR data into the template render. |
| tools/templates/open_tasks.md.j2 | Renders the new “Community pull requests” section and table when community_prs is non-empty. |
| tools/test_generate_open_tasks.py | Adds tests for PR community filtering, linked-issue detection, and correct rendering/escaping behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if pr_has_linked_issue(repo_full, pr["number"]): | ||
| continue |
|
@TheCodedKid There's a note by Copilog about too many GraphQL requests being made. Please also sign off on the commit as required by DCO. |
Signed-off-by: TheCodedKid <samuel.raumin@gmail.com>
|
@NickVolynkin made some changes to reflect what copilot found, also made signoffs default on my nix config, so we shouldn't have that issue anymore. |
df83958
into
flipperdevices:public-release
|
@TheCodedKid it seems that DCO checks requires a blank line before the "Signed-off-by" string. I've squashed commits and added that line. Thanks you! |
Closes #409
What
Extends
generate_open_tasks.pyto render a new Community pull requests section on the Open-tasks page, showing open PRs that don't relate to any issue on the boards. This is for the purpose of allowing the community to help review and discuss these suggestions.The idea came from @NickVolynkin, and I liked it too.
How it works
fetch_community_prs()fires a oneshotgh search prs --owner flipperdevices --state opencall, then keeps a PR only if all three conditions are met:SECTIONSslugs, so unrelated org repos aren't pulled in.authorAssociationis not aMEMBERor anOWNER, and is not a bot. This uses GitHub's rather handyauthorAssociationcall to determine that.pr_has_linked_issue()checksclosingIssuesReferences.totalCountvia GraphQL for a value of 0.Matching PRs render in a new section at the bottom of the page, grouped into one table (repo#number, title, author, comment count, draft flag). The section is omitted when there are no PRs to show.
Scope
SECTION_SLUGSfilter if desired.Testing
mypy --strictcomes back clean.