cherry-bot icon indicating copy to clipboard operation
cherry-bot copied to clipboard

UCP: `auto-update` reuse exist pull request

Open you06 opened this issue 6 years ago • 2 comments

Description

When the auto-update being triggered frequently, there will be many opened PRs being generated, but only the latest one is required, the outdated unmerged PRs are spamming.

Score

  • 100

Mentor

@you06

Recommended Skills

  • Go

Learning Materials

you06 avatar Mar 03 '20 09:03 you06

I'd like to finish it, but I don't have any ideas. Could you give me more information? :+1: thanks.

sunl888 avatar Mar 31 '20 15:03 sunl888

The updated PR will be created here. https://github.com/pingcap-incubator/cherry-bot/blob/53734a35c63e1f7b67a2654ceeffb478c122cd90/pkg/providers/auto-update/pr.go#L59

To reuse an exist PR, you need to find it and force push to the head branch. Unfortunately, there is not a way to find the exist PR directory, you may filter PRs by author, target branch and title to find out it (it's also ok to record in database if you would like to create a new table).

you06 avatar Apr 01 '20 12:04 you06