PR status only take the first check into account

Open Beginner friendly
#225 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
javascript
Domain
frontend

Research direction

Start in trac-env/htdocs/tickethacks.js around line 124, where the pull request status is determined from the checks. Review how all check statuses are represented, then update the aggregation so building takes precedence, errors are reported when present, and success requires every check to succeed. Confirm the displayed Trac status against pull requests with multiple checks.

Written by the indexing model from the issue text.

Description

bug

I was confused today because my PR was marked as "build: success" on Trac, but it had fail on github.

Investigating the issue, I discovered that the javascript that figures out the status of a PR only takes the first check into account: https://github.com/django/code.djangoproject.com/blob/a8774abd91108baa70eb936c5ad5a736dd646b5b/trac-env/htdocs/tickethacks.js#L124

Considering we have around 50 checks, I don't think this logic is accurate.

I would suggest that the status should be "building" if any individual check has status=building, "error" if at least one check has status=error, and "success" only if all checks have status=success (not sure if there are other statues to take into account)

Dominant language
Python
Stars
66
Forks
62
PR merge metrics
No merged PRs in 30d

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.

More from django/code.djangoproject.com

All issues in django/code.djangoproject.com

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.