You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by lo...@apache.org on 2022/04/06 17:16:01 UTC
[beam] branch master updated: Avoid pr-bot state desync (#17299)
This is an automated email from the ASF dual-hosted git repository.
lostluck pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new 3f601400fc8 Avoid pr-bot state desync (#17299)
3f601400fc8 is described below
commit 3f601400fc88961533313e908527ccb73bc6d07c
Author: Danny McCormick <da...@google.com>
AuthorDate: Wed Apr 6 13:15:54 2022 -0400
Avoid pr-bot state desync (#17299)
---
scripts/ci/pr-bot/processNewPrs.ts | 2 ++
scripts/ci/pr-bot/shared/persistentState.ts | 9 +++------
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/scripts/ci/pr-bot/processNewPrs.ts b/scripts/ci/pr-bot/processNewPrs.ts
index 84351adc0ca..d3d0b2d5524 100644
--- a/scripts/ci/pr-bot/processNewPrs.ts
+++ b/scripts/ci/pr-bot/processNewPrs.ts
@@ -225,6 +225,8 @@ async function processPull(
return;
}
}
+ // If none of the approvers were assigned to the pr, no-op.
+ return;
}
let checkState = await getChecksStatus(REPO_OWNER, REPO, pull.head.sha);
diff --git a/scripts/ci/pr-bot/shared/persistentState.ts b/scripts/ci/pr-bot/shared/persistentState.ts
index e440d2ae3d8..e2bf2f9354e 100644
--- a/scripts/ci/pr-bot/shared/persistentState.ts
+++ b/scripts/ci/pr-bot/shared/persistentState.ts
@@ -115,12 +115,9 @@ export class PersistentState {
console.log(
"Couldnt find branch pr-bot-state in origin, trying to create it"
);
- try {
- await exec.exec("git checkout -b pr-bot-state");
- } catch {
- console.log("Creating branch failed, trying a simple checkout.");
- await exec.exec("git checkout pr-bot-state");
- }
+ await exec.exec("git checkout -b pr-bot-state");
+ // Ensure that if we've created or just checked out the branch that we can also push to it
+ await exec.exec("git push origin pr-bot-state");
}
this.switchedBranch = true;
}