leanprover-community / leanprover-community/queueboard-core

Fix: take CI results into account in the "last updated" and "total time in review" columns

Open
#25 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug prio:low
Dominant language
Python
Stars
5
Forks
9
Avg merge
2h 58m
Merged PRs (30d)
4

Description

Right now, the algorithm for computing a PR's state over time only looks at label and draft status changes, not at the CI status. Fixing this is easy in principle (I have a branch doing so), but runs into a tricky bug:

There is no good easy way to determine when a commit was pushed to a pull request.

A commit has an authored date and commit date (which could be later if e.g. a commit was rebased) --- but we care about the time of the push. Github's graphql doesn't expose this information [any more] (and the pushDate field also was not reliable before).

One could query the REST API for github pushes to a pull request: that seems like it should work, but requiring additional API calls is not nice. We'd like to avoid doing this all over; some engineering could certainly help

  • only ask for push dates when CI actually fails for the first time, and passes again
  • cache the results somehow. Probably, it's useful to have a separate JSON file, and the analysis merging the information in these every time. Implementable, but not fun!

Another option: live with values that are sometimes wrong.
Is there a third, better way I don't know yet?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the algorithm that computes a pull request's state over time, focusing on how label and draft-status changes are currently used. Compare the available commit dates with GitHub GraphQL and REST push data, then define a reliable approach that accounts for CI status and produces correct “last updated” and “total time in review” values.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, python
Domain
analytics, ci-cd
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.