brandonchinn178 / brandonchinn178/mergit

Handle pushes to PR after merge run started

Open
#126 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

## Describe the bug

If a PR is pushed to after it's queued (but before the merge run starts), the new HEAD of the PR should have a new check run, which effectively dequeues the PR.

The problem is if a PR is pushed to after the merge run starts, where the merge commit now has a parent that doesn't refer to a PR anymore.

Today, If a commit is pushed to a PR after the merge run started, you’ll get a “MergeBot Error” that says “Commit … does not have an associated pull request”, because the commit pushed to the staging branch will not refer to a PR anymore

## Steps to Reproduce

1. Open a PR
2. Queue for merge (make the CI job really long, like `sleep 3600`)
3. Push another commit to the PR
4. Go to the merge bot website

## Expected behavior

Should display a list of PRs

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the workflow on the merge bot website: queue a PR with a long CI job, push another commit, and inspect the resulting merge run. Trace how the pushed commit is associated with a pull request after the merge run starts. Done means the website displays the PR list instead of a “Commit … does not have an associated pull request” error.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, haskell
Domain
ci-cd, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.