Skip to content

[open-tasks]: Show active PRs for each task (#369)#396

Merged
NickVolynkin merged 1 commit into
flipperdevices:public-releasefrom
TheCodedKid:issue-369
Jul 9, 2026
Merged

[open-tasks]: Show active PRs for each task (#369)#396
NickVolynkin merged 1 commit into
flipperdevices:public-releasefrom
TheCodedKid:issue-369

Conversation

@TheCodedKid

Copy link
Copy Markdown
Contributor

Closes #369

What

Each help wanted issue 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 a linkedPRs field.
  • New fetch_linked_prs() runs a gh api graphql query per issue to get its associated open PRs.
  • render_section() emits a 🔀 emoji line per linked PR with a (draft) suffix.
  • Intro copy updated to mention "any open pull requests already working on the task".

Limitations

  • closedByPullRequestsReferences only 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: false means a merged PR drops off the list even if the issue is briefly still open. Self-corrects when the issue closes.

Tests

  • Added test_generate_page_renders_linked_prs -- covers the 🔀 row, (draft) suffix, and HTML escaping function.
  • Added test_fetch_linked_prs_parses_nodes -- mocks gh and verifies PR-node parsing plus correct owner/repo/number args passed to the GraphQL call.
  • Added test_fetch_linked_prs_handles_missing_issue -- issue: null yields [] instead of crashing (always have to remind myself of this test).
  • Fixed a pre-existing stale assertion in test_generate_page_renders_empty_sections_and_comments_header.

Notes

  • Not sure if this is the semantics you want to use for marking the PR's, I am totally open to discussion on what you all would like to see as a convention for this.
  • sorry about my linter, it's the zed default ;[, if someone has opinion about it, please let me know and I will fix.
  • claude helped a bit with this, mostly with understanding graphql and how it works.

Copilot AI review requested due to automatic review settings July 2, 2026 08:42
@TheCodedKid TheCodedKid marked this pull request as draft July 2, 2026 08:43

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

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 linkedPRs field 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.

Comment thread tools/generate_open_tasks.py Outdated
Comment thread tools/generate_open_tasks.py Outdated
Comment thread tools/test_generate_open_tasks.py
@NickVolynkin

NickVolynkin commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

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

Comment thread tools/generate_open_tasks.py Outdated
Comment thread tools/generate_open_tasks.py Outdated
Comment thread tools/generate_open_tasks.py Outdated
Comment thread tools/generate_open_tasks.py Outdated
Comment thread tools/generate_open_tasks.py Outdated
Comment thread tools/test_generate_open_tasks.py Outdated
@TheCodedKid

Copy link
Copy Markdown
Contributor Author

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

@TheCodedKid

Copy link
Copy Markdown
Contributor Author

I am going to fix the linting, I agree with that is being said here. Apologizes on that.

@TheCodedKid

Copy link
Copy Markdown
Contributor Author

Ok, should be fixed, let me know :]

@NickVolynkin

Copy link
Copy Markdown
Collaborator

@TheCodedKid #394 introduced some static typing; please rebase your PR. And note the DCO requirement -- please sign your commit using git commit --amend --signoff.

Signed-off-by: TheCodedKid <samuel.raumin@gmail.com>
@TheCodedKid

Copy link
Copy Markdown
Contributor Author

Rebased and signed off, lmk

@NickVolynkin

Copy link
Copy Markdown
Collaborator

@TheCodedKid I see that the PR is still in draft mode. Is it ready for review?

@TheCodedKid TheCodedKid marked this pull request as ready for review July 6, 2026 21:39
@TheCodedKid

Copy link
Copy Markdown
Contributor Author

yes it is!

@NickVolynkin

Copy link
Copy Markdown
Collaborator

Ok, cool, will review it today or tomorrow.

@NickVolynkin NickVolynkin merged commit 0ac99b6 into flipperdevices:public-release Jul 9, 2026
3 checks passed
@NickVolynkin

Copy link
Copy Markdown
Collaborator

@TheCodedKid great, thank you!

@NickVolynkin

NickVolynkin commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

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

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.

[open-tasks]: Show active PRs for each task

3 participants