From ac3b5be0f097d423ef85750f2e6cbe11aec09fda Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Thu, 9 Jun 2022 00:42:51 -0700 Subject: [PATCH 1/5] try no auth --- entrypoint.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.rb b/entrypoint.rb index f46855f..c84ee34 100755 --- a/entrypoint.rb +++ b/entrypoint.rb @@ -15,7 +15,7 @@ config.allowed_conclusions = allowed_conclusions.split(",").map(&:strip) config.check_name = check_name config.check_regexp = check_regexp - config.client = Octokit::Client.new(access_token: token) + config.client = Octokit::Client.new config.ref = ref config.repo = ENV["GITHUB_REPOSITORY"] config.verbose = verbose From 634ce300f4ab0dcf82839e6af4a2cd4491e190db Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Thu, 9 Jun 2022 00:51:09 -0700 Subject: [PATCH 2/5] is this how this works? --- entrypoint.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/entrypoint.rb b/entrypoint.rb index c84ee34..7ea1b0f 100755 --- a/entrypoint.rb +++ b/entrypoint.rb @@ -16,6 +16,9 @@ config.check_name = check_name config.check_regexp = check_regexp config.client = Octokit::Client.new + if token != "" + config.client.access_token(token) + end config.ref = ref config.repo = ENV["GITHUB_REPOSITORY"] config.verbose = verbose From cba19f49c940963c7bd2fb59c629c3c2bd056eda Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Thu, 9 Jun 2022 01:02:16 -0700 Subject: [PATCH 3/5] think this should work --- entrypoint.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entrypoint.rb b/entrypoint.rb index 7ea1b0f..1e3ff6d 100755 --- a/entrypoint.rb +++ b/entrypoint.rb @@ -16,8 +16,8 @@ config.check_name = check_name config.check_regexp = check_regexp config.client = Octokit::Client.new - if token != "" - config.client.access_token(token) + if token.empty? + config.client.access_token = token end config.ref = ref config.repo = ENV["GITHUB_REPOSITORY"] From 8c77e11c4095fc58ce29752d3e8f47d4d6b31908 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Thu, 9 Jun 2022 01:07:59 -0700 Subject: [PATCH 4/5] cool ruby syntax! --- entrypoint.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.rb b/entrypoint.rb index 1e3ff6d..d4fd4f6 100755 --- a/entrypoint.rb +++ b/entrypoint.rb @@ -16,7 +16,7 @@ config.check_name = check_name config.check_regexp = check_regexp config.client = Octokit::Client.new - if token.empty? + unless token.empty? config.client.access_token = token end config.ref = ref From 19703664c354e02fa4da674e1f2c321845dce083 Mon Sep 17 00:00:00 2001 From: Matias Albarello Date: Sun, 19 Jun 2022 16:51:09 +0200 Subject: [PATCH 5/5] Create wait-for-check-without-token.yml --- .../wait-for-check-without-token.yml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/wait-for-check-without-token.yml diff --git a/.github/workflows/wait-for-check-without-token.yml b/.github/workflows/wait-for-check-without-token.yml new file mode 100644 index 0000000..9db3e9a --- /dev/null +++ b/.github/workflows/wait-for-check-without-token.yml @@ -0,0 +1,20 @@ +name: Wait for check name +on: + push: + workflow_dispatch: + +jobs: + wait-without-token: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Wait without token + uses: ./ + with: + ref: ${{ github.sha }} + wait-interval: 10 # seconds + running-workflow-name: wait-without-token + check-name: wait-on-me + + - name: Success + run: echo 'Success!'