Skip to content

feat: support tracking stable branches#14

Merged
uncenter merged 4 commits intouncenter:mainfrom
bryango:feature
Jul 27, 2025
Merged

feat: support tracking stable branches#14
uncenter merged 4 commits intouncenter:mainfrom
bryango:feature

Conversation

@bryango
Copy link
Contributor

@bryango bryango commented Jul 23, 2025

Closes #13.

This PR implements tracking for stable branches. It includes the following changes:

  • Branches are slightly re-ordered (now it's staging > staging-next > master > ,,,) to better represent the staging workflow.
  • PRs targeting the stable branches are now correctly tracked, including stable staging PRs like the one mentioned in Feature request: track stable-targeted PRs (like backports) against stable branches #13.
  • This is enabled by looking at the head and base fields of the API json responses, held in the PullRequest struct. Adding these fields is technically a breaking change for the lib crate, but really no one should be constructing these responses by hand and the fields are clearly non-exhaustive, so we take the chance to add the #[non_exhaustive] marker to the relevant structs.
  • Along the way, we add some pagination parameters in the API url for it to return less irrelevant information. This is a hack which may speed up the responses and its processing. This is the first commit and it's not exactly related to the others so it can be dropped independently if it feels too unnecessarily hacky.

bryango added 3 commits July 23, 2025 12:57
Also we mark these structs as #[non_exhaustive] since more information
may be introduced in the future.
Copy link
Owner

@uncenter uncenter left a comment

Choose a reason for hiding this comment

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

This looks good and seems to work! I appreciate your comments about the different changes you made in the PR comment - very helpful. We can leave the pagination parameters hack if you think it'll help perf, I doubt it would make it worse.


@acid-bong does this match your expectations for this behavior?

@uncenter
Copy link
Owner

We can leave the pagination parameters hack if you think it'll help perf, I doubt it would make it worse.

For what it's worth some very sketchy tests seem to put this PR at 33% and 47% faster for similar recently merged PRs (2.23s and 2.35s on main, vs 1.49s and 1.23s on this branch). Small sample but it does seem like a good idea!

@acid-bong
Copy link

My internet is too slow today, not sure if i can test it (i really hope this comment gets sent)

@acid-bong
Copy link

[414871] [Backport staging-25.05] cpython: 3.13.3 -> 3.13.4; 3.12.10 -> 3.12.11; 3.11.12 -> 3.11.13; 3.10.17 -> 3.10.18
Merged 42 days 15 hours 22 minutes and 16 seconds ago (2025-06-14T02:35:11+00:00), 6 days 2 hours 47 minutes and 48 seconds after creation, into branch 'staging-25.05'.
staging-25.05: ✅
staging-next-25.05: ✅
release-25.05: ✅
nixpkgs-25.05-darwin: ✅
nixos-25.05-small: ✅
nixos-25.05: ✅

Now that's perfect, thx a lot

@bryango
Copy link
Contributor Author

bryango commented Jul 27, 2025

Push a reformat commit, should pass CI now 😆

@uncenter uncenter merged commit 44937e8 into uncenter:main Jul 27, 2025
2 checks passed
@github-actions github-actions bot mentioned this pull request Jan 9, 2026
@uncenter
Copy link
Owner

uncenter commented Jan 9, 2026

Sorry for the delay, I had some annoying issues with release-please and cargo/crates.io publishing. Gave up on most of it and published v0.5.0 locally which finally includes your changes here. Thanks so much! ❤️

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.

Feature request: track stable-targeted PRs (like backports) against stable branches

3 participants