diff --git a/.buildkite/scripts/common/setup_job_env.sh b/.buildkite/scripts/common/setup_job_env.sh index 6066e24708f761..bc1d902af781b6 100644 --- a/.buildkite/scripts/common/setup_job_env.sh +++ b/.buildkite/scripts/common/setup_job_env.sh @@ -16,9 +16,6 @@ fi GITHUB_TOKEN=$(vault_get kibanamachine github_token) export GITHUB_TOKEN - KIBANA_CI_GITHUB_TOKEN=$(vault_get kibana-ci-github github_token) - export KIBANA_CI_GITHUB_TOKEN - KIBANA_DOCKER_USERNAME="$(vault_get container-registry username)" KIBANA_DOCKER_PASSWORD="$(vault_get container-registry password)" if (command -v docker && docker version) &> /dev/null; then diff --git a/.buildkite/scripts/steps/api_docs/publish_api_docs.sh b/.buildkite/scripts/steps/api_docs/publish_api_docs.sh index 77f6fb0888fb3b..7ab4ae6b3497ca 100755 --- a/.buildkite/scripts/steps/api_docs/publish_api_docs.sh +++ b/.buildkite/scripts/steps/api_docs/publish_api_docs.sh @@ -29,5 +29,3 @@ git push origin "$branch" prUrl=$(gh pr create --repo elastic/kibana --base main --head "$branch" --title "[api-docs] $(date +%F) Daily api_docs build" --body "Generated by $BUILDKITE_BUILD_URL" --label "release_note:skip" --label "docs") echo "Opened PR: $prUrl" gh pr merge --repo elastic/kibana --auto --squash "$prUrl" - -GH_TOKEN="$KIBANA_CI_GITHUB_TOKEN" gh pr review --repo elastic/kibana --approve -b "Automated review from $BUILDKITE_BUILD_URL" "$prUrl" diff --git a/.github/workflows/auto-approve-api-docs.yml b/.github/workflows/auto-approve-api-docs.yml new file mode 100644 index 00000000000000..503ea9634d00eb --- /dev/null +++ b/.github/workflows/auto-approve-api-docs.yml @@ -0,0 +1,18 @@ +on: + pull_request: + branches: + - main + types: + - opened + +jobs: + approve: + name: Auto-approve API docs + runs-on: ubuntu-latest + if: | + startsWith(github.event.pull_request.head.ref, 'api_docs') && + github.event.pull_request.user.login == 'kibanamachine' + permissions: + pull-requests: write + steps: + - uses: hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 #4.0.0 diff --git a/.github/workflows/auto-approve-backports.yml b/.github/workflows/auto-approve-backports.yml index 4b205f6971792a..2f73696406d92b 100644 --- a/.github/workflows/auto-approve-backports.yml +++ b/.github/workflows/auto-approve-backports.yml @@ -1,7 +1,9 @@ on: - pull_request_target: + pull_request: branches-ignore: - main + types: + - opened jobs: approve: @@ -13,4 +15,4 @@ jobs: permissions: pull-requests: write steps: - - uses: hmarr/auto-approve-action@v3 + - uses: hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 #4.0.0