Skip to content

Show unlinked community PRs on the Open-tasks page (#409)#412

Merged
NickVolynkin merged 3 commits into
flipperdevices:public-releasefrom
TheCodedKid:issue409
Jul 23, 2026
Merged

Show unlinked community PRs on the Open-tasks page (#409)#412
NickVolynkin merged 3 commits into
flipperdevices:public-releasefrom
TheCodedKid:issue409

Conversation

@TheCodedKid

Copy link
Copy Markdown
Contributor

Closes #409

What

Extends generate_open_tasks.py to 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 oneshot gh search prs --owner flipperdevices --state open call, then keeps a PR only if all three conditions are met:

  • In a Flipper One sub-project repo -- filtered against the existing SECTIONS slugs, so unrelated org repos aren't pulled in.
  • From a community author -- authorAssociation is not a MEMBER or an OWNER, and is not a bot. This uses GitHub's rather handy authorAssociation call to determine that.
  • Not linked to an issue -- pr_has_linked_issue() checks closingIssuesReferences.totalCount via 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

  • Limited to the documented Flipper One sub-project repos, not the whole org. This can be made wider by adjusting the SECTION_SLUGS filter if desired.
  • Combined section rather than per-sub-project grouping, to keep the diff small.

Testing

Copilot AI review requested due to automatic review settings July 15, 2026 07:16
@TheCodedKid

Copy link
Copy Markdown
Contributor Author

Let me know what you all think :]

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.py with community PR fetching/filtering (community author + no linked issue) and template rendering data preparation.
  • Update tools/templates/open_tasks.md.j2 to 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.

Comment thread tools/generate_open_tasks.py Outdated
Comment on lines +291 to +292
if pr_has_linked_issue(repo_full, pr["number"]):
continue
@NickVolynkin

Copy link
Copy Markdown
Collaborator

@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.

@TheCodedKid

Copy link
Copy Markdown
Contributor Author

@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.
let me know

@NickVolynkin
NickVolynkin merged commit df83958 into flipperdevices:public-release Jul 23, 2026
2 of 3 checks passed
@NickVolynkin

Copy link
Copy Markdown
Collaborator

@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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show unlinked community PRs on the Open-tasks page

3 participants