Skip to content

Commit 4838474

Browse files
ci: auto-approve and merge API reference sync PRs (#10853)
* ci: auto-approve and merge API reference sync PRs * Update .github/workflows/auto_approve_api_ref_sync.yml Co-authored-by: Julian Risch <julian.risch@deepset.ai> * fix * no forks --------- Co-authored-by: Julian Risch <julian.risch@deepset.ai>
1 parent 1abd5c3 commit 4838474

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Approve and merge API reference sync PRs
2+
3+
# Automatically approve and merge API reference sync PRs from Haystack, Haystack Core Integrations,
4+
# and Haystack Experimental
5+
6+
on:
7+
pull_request:
8+
branches:
9+
- main
10+
paths:
11+
- "docs-website/reference/**"
12+
- "docs-website/reference_versioned_docs/**"
13+
14+
permissions:
15+
pull-requests: write
16+
contents: write
17+
18+
env:
19+
GH_TOKEN: ${{ github.token }}
20+
21+
jobs:
22+
auto-approve-and-merge:
23+
if: |
24+
github.event.pull_request.user.login == 'HaystackBot' &&
25+
startsWith(github.event.pull_request.head.ref, 'sync-docusaurus-api-reference') &&
26+
github.event.pull_request.head.repo.full_name == github.repository
27+
runs-on: ubuntu-slim
28+
steps:
29+
- name: Approve PR
30+
run: gh pr review --approve ${{ github.event.pull_request.number }} --repo ${{ github.repository }}
31+
32+
- name: Enable auto-merge
33+
run: gh pr merge --squash --auto ${{ github.event.pull_request.number }} --repo ${{ github.repository }}

0 commit comments

Comments
 (0)