PR Update Automation
Mantenedores costumam responder em até 3 dias
Avaliação
Esta issue ainda não foi avaliada.
Descrição
Is your feature request related to a problem? Please describe.
When PRs are approved they need their branches to be manually kept up to date with the state of dev, this is a bottleneck issue in getting more PRs through because we can't automate a pipeline. The solution is to use an action to update the PRs when dev gets pushed. This should update only the oldest PR which is both approved and has automerge enabled. These two properties together can thus be used by maintainers to signify a PR is ready to be eventually merged, there shouldn't every be many of these so it's not going to create ordering confusion, but will stop working if a PR is help up with test fails. This is an alternative to merge queues.
Describe the solution you'd like
The action below is derived from this test which automates this process:
name: Auto-Update PRs
on:
push:
branches:
- main # Change to your primary target branch (e.g., dev)
workflow_dispatch: # Allows manual triggering if needed
permissions:
contents: write
pull-requests: write
jobs:
update-prs:
runs-on: ubuntu-latest
steps:
- name: Checkout target branch
uses: actions/checkout@v6
with:
fetch-depth: 0 # Fetches all history so branches can be merged locally
- name: Update the oldest PR which is approved and automerging-enabled
env:
GH_TOKEN: ${{ secrets.PAT_UPDATE_TOKEN }}
run: |
# Find all open PRs targeting this branch which are open and approved
PR_DATA=$(gh pr list --state open --search 'review:approved' --base ${{ github.ref_name }} --json number,reviewDecision,autoMergeRequest)
echo '================================'
echo "PR_DATA:"
echo $PR_DATA
echo '================================'
# select the oldest open approved PR with automerge enabled
OLDEST_APPROVED=$(echo $PR_DATA | jq -r '.[] | select(.reviewDecision == "APPROVED") | select(.autoMergeRequest != null) | "\(.number)"'|head -n 1)
if [ -z "$OLDEST_APPROVED" ]
then
echo "No approved PRs to update."
else
echo "Updating PR $OLDEST_APPROVED ..."
gh pr update-branch "$OLDEST_APPROVED" || echo "Failed to update PR #$OLDEST_APPROVED (merge conflicts?)."
fi
This critically relies on a personal access token (PAT) being set to PAT_UPDATE_TOKEN which has read/write permissions for Contents and PullRequests (and maybe Actions as well). This won't work with GITHUB_TOKEN since approval will be required to run the actions in each updated PR and so obviate the point of the exercise.
The possible plan then is to PR this action in and setup a PAT to provide the permissions, though whose PAT is the question to answer. This stems from a recent change to Github security rules.
The alternative is to try merge queues and see how they work, see #8991 and Merge Queue Docs.
- Linguagem predominante
- Python
- Estrelas
- 8.8k
- Forks
- 1.7k
- Merge médio
- 5d 3h
- PRs com merge (30d)
- 13
Preparar o ambiente
- Inclui um Dockerfile ou arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de Project-MONAI/MONAI
-
partition_datasetAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Project-MONAI/MONAI#9220 ·
Mantenedores costumam responder em até 3 dias
-
partition_dataset with ratios leaves some items out of every partitionTalvez já em andamento @mottopanikeiku assumiu há 3 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Project-MONAI/MONAI#9216 ·
Mantenedores costumam responder em até 3 dias
-
FocalLoss mean reduction is multiplied by the number of channels when ignore_index is setTalvez já em andamento @mottopanikeiku assumiu há 3 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Project-MONAI/MONAI#9214 ·
Mantenedores costumam responder em até 3 dias
-
DiNTS: missing graph-break regression test (follow-up to #9145)Talvez já em andamento @nilapate assumiu há 16 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
Project-MONAI/MONAI#9159 ·
Mantenedores costumam responder em até 3 dias
-
ProbMapProducer raises IndexError on numpy 2.x: SlidingPatchWSIDataset emits float locationsTalvez já em andamento @nilapate assumiu há 27 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Project-MONAI/MONAI#9135 · 1 comentário ·
Mantenedores costumam responder em até 3 dias
Todas as issues de Project-MONAI/MONAI
Issues semelhantes
-
bug P2 rust
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
jscott3201/rusty-bacnet#2085 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
evarness-ai/iris-harness#401 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
sistemicorp/scripts#62 ·
-
area/mac help wanted needs-qa
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 76/100