aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralexv-smirnov <alex@ydb.tech>2023-12-05 12:03:11 +0300
committeralexv-smirnov <alex@ydb.tech>2023-12-05 13:40:04 +0300
commit98d84fe1fc9b4565c05cf5c191a5ee66c6f11a1a (patch)
treee473f88abf40f39038267204910c50540219e15e
parent1d17d3cbd320ede2a343f42894abd095b96d832c (diff)
downloadydb-98d84fe1fc9b4565c05cf5c191a5ee66c6f11a1a.tar.gz
Change "pr_check.yml"
-rw-r--r--.github/workflows/pr_check.yml20
1 files changed, 12 insertions, 8 deletions
diff --git a/.github/workflows/pr_check.yml b/.github/workflows/pr_check.yml
index 16043ed9ee..87a0c3c759 100644
--- a/.github/workflows/pr_check.yml
+++ b/.github/workflows/pr_check.yml
@@ -28,6 +28,17 @@ jobs:
with:
github-token: ${{ secrets.YDB_PLATFORM_BOT_TOKEN_REPO }}
script: |
+ const labels = context.payload.pull_request.labels;
+ const okToTestLabel = labels.find(
+ label => label.name == 'ok-to-test'
+ );
+
+ console.log("okToTestLabel=%o", okToTestLabel !== undefined);
+
+ if (okToTestLabel !== undefined) {
+ return true;
+ }
+
// This is used primarily in forks. Repository owner
// should be allowed to run anything.
const userLogin = context.payload.pull_request.user.login;
@@ -59,15 +70,8 @@ jobs:
console.log("You are a collaborator!");
return true;
}
-
- const labels = context.payload.pull_request.labels;
- const okToTestLabel = labels.find(
- label => label.name == 'ok-to-test'
- );
-
- console.log("okToTestLabel=%o", okToTestLabel !== undefined);
- return okToTestLabel !== undefined;
+ return false;
- name: comment-if-waiting-on-ok
if: steps.check-ownership-membership.outputs.result == 'false' &&
github.event.action == 'opened'