[PATCH] D123657: [workflow] Don't fail workflow if we already have a PR for an issue
Tom Stellard via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 13 10:23:14 PDT 2022
tstellar added inline comments.
================
Comment at: llvm/utils/git/github-automation.py:15
+import github.Repository
+import github.PullRequest
import os
----------------
Do we need these if we already have import github ?
================
Comment at: llvm/utils/git/github-automation.py:197
+ def check_if_pull_request_exists(self, repo:github.Repository.Repository, title:str) -> Optional[github.PullRequest.PullRequest]:
+ for pr in repo.get_pulls():
+ if pr.title == title:
----------------
I think you can access the pull request directly based on the head branch: repo.get_pull(head='owner:branch')
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123657/new/
https://reviews.llvm.org/D123657
More information about the llvm-commits
mailing list