Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/sync-agent-sdk-openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ permissions:
contents: write
pull-requests: write

concurrency:
group: sync-agent-sdk-openapi
cancel-in-progress: true

jobs:
sync-openapi:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -81,6 +85,7 @@ jobs:

- name: Create Pull Request
if: steps.detect_changes.outputs.changes == 'true'
id: cpr
uses: peter-evans/create-pull-request@v7
with:
add-paths: openapi/agent-sdk.json
Expand All @@ -105,3 +110,24 @@ jobs:
- [x] If the change is significant, I have run the documentation site locally and confirmed it renders as expected.

**Note**: This is an automated pull request. Please review the changes to ensure they are correct before merging.

- name: Auto-approve PR
if: steps.cpr.outputs.pull-request-url && secrets.DOCS_SYNC_TOKEN
env:
GH_TOKEN: ${{ secrets.DOCS_SYNC_TOKEN }}
run: |
gh pr review "${{ steps.cpr.outputs.pull-request-url }}" \
--approve \
--body "Auto-approving automated OpenAPI sync PR."

- name: Enable auto-merge (squash)
if: steps.cpr.outputs.pull-request-url && secrets.DOCS_SYNC_TOKEN
env:
GH_TOKEN: ${{ secrets.DOCS_SYNC_TOKEN }}
run: |
PR_URL="${{ steps.cpr.outputs.pull-request-url }}"

# Prefer auto-merge (merges when required checks finish).
# If auto-merge isn't enabled for the repo, fall back to attempting an immediate merge.
gh pr merge "$PR_URL" --auto --delete-branch --squash \
|| gh pr merge "$PR_URL" --delete-branch --squash
26 changes: 26 additions & 0 deletions .github/workflows/sync-docs-code-blocks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ permissions:
contents: write
pull-requests: write

concurrency:
group: sync-docs-code-blocks
cancel-in-progress: true

jobs:
sync-code-blocks:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -69,6 +73,7 @@ jobs:

- name: Create Pull Request
if: steps.detect_changes.outputs.changes == 'true'
id: cpr
uses: peter-evans/create-pull-request@v7
with:
commit-message: |
Expand All @@ -94,3 +99,24 @@ jobs:
### Checklist
- [x] I have read and reviewed the documentation changes to the best of my ability.
- [x] If the change is significant, I have run the documentation site locally and confirmed it renders as expected.

- name: Auto-approve PR
if: steps.cpr.outputs.pull-request-url && secrets.DOCS_SYNC_TOKEN
env:
GH_TOKEN: ${{ secrets.DOCS_SYNC_TOKEN }}
run: |
gh pr review "${{ steps.cpr.outputs.pull-request-url }}" \
--approve \
--body "Auto-approving automated docs sync PR."

- name: Enable auto-merge (squash)
if: steps.cpr.outputs.pull-request-url && secrets.DOCS_SYNC_TOKEN
env:
GH_TOKEN: ${{ secrets.DOCS_SYNC_TOKEN }}
run: |
PR_URL="${{ steps.cpr.outputs.pull-request-url }}"

# Prefer auto-merge (merges when required checks finish).
# If auto-merge isn't enabled for the repo, fall back to attempting an immediate merge.
gh pr merge "$PR_URL" --auto --delete-branch --squash \
|| gh pr merge "$PR_URL" --delete-branch --squash