mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[ci] Use github action to approve API docs (#187246)
Cleans up our auto-approve scripts a bit to be consistent. This matches the auto-approve backport workflow.
This commit is contained in:
parent
ccfc5d3bb9
commit
581e88ba81
4 changed files with 22 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
18
.github/workflows/auto-approve-api-docs.yml
vendored
Normal file
18
.github/workflows/auto-approve-api-docs.yml
vendored
Normal file
|
@ -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
|
6
.github/workflows/auto-approve-backports.yml
vendored
6
.github/workflows/auto-approve-backports.yml
vendored
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue