This is an archive of the discontinued LLVM Phabricator instance.

[workflow] Don't fail workflow if we already have a PR for an issue
ClosedPublic

Authored by thieta on Apr 13 2022, 12:07 AM.

Details

Summary

When running /cherry-pick several times you will get an
error when it tries to create a new PR since there already
is one.

This checks if we have PR first.

Fixes #54862

Diff Detail

Event Timeline

thieta created this revision.Apr 13 2022, 12:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 13 2022, 12:07 AM
thieta requested review of this revision.Apr 13 2022, 12:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 13 2022, 12:07 AM
thieta updated this revision to Diff 422409.Apr 13 2022, 12:09 AM

Removed unintentional debug lines

tstellar added inline comments.Apr 13 2022, 10:23 AM
llvm/utils/git/github-automation.py
15

Do we need these if we already have import github ?

195

I think you can access the pull request directly based on the head branch: repo.get_pull(head='owner:branch')

thieta updated this revision to Diff 422755.Apr 14 2022, 12:20 AM
thieta marked an inline comment as done.

Remove unused parameter

llvm/utils/git/github-automation.py
15

I think vscode was adding this because I used them in the type-hinting below. I removed the lines again.

195

Yeah I changed it to that now - but this can in theory return multiple PR's. I wonder if we need to handle this better if we get multiple matches. But I struggled to see how that would matter.

@tstellar ping - should we merge this now?

tstellar accepted this revision.May 26 2022, 10:43 PM

Sorry for the delay, I though this was merged already. LGTM.

This revision is now accepted and ready to land.May 26 2022, 10:43 PM
This revision was landed with ongoing or failed builds.May 27 2022, 7:02 AM
This revision was automatically updated to reflect the committed changes.