fix(aimlapi): send partner headers only when the request actually goe… #127
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Merge main into mergeable PRs | |
| on: | |
| push: | |
| branches: [main] | |
| schedule: | |
| - cron: "0 * * * *" # catches PRs approved while already behind main | |
| workflow_dispatch: | |
| concurrency: | |
| group: update-mergeable-prs | |
| cancel-in-progress: false | |
| permissions: {} # uses a PAT so the merge commit triggers CI | |
| jobs: | |
| update-branch: | |
| if: github.repository == 'CherryHQ/cherry-studio' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Merge main into approved PRs whose only blocker is being behind | |
| env: | |
| GH_TOKEN: ${{ secrets.TOKEN_GITHUB_WRITE }} | |
| GH_REPO: ${{ github.repository }} | |
| run: | | |
| gh pr list --base main --state open --limit 100 \ | |
| --json number,isDraft,mergeStateStatus,reviewDecision \ | |
| --jq '.[] | select(.isDraft == false and .mergeStateStatus == "BEHIND" and .reviewDecision == "APPROVED") | .number' \ | |
| | while read -r pr; do | |
| if gh api --method PUT "repos/$GH_REPO/pulls/$pr/update-branch" --silent; then | |
| echo "updated #$pr" | |
| else | |
| echo "could not update #$pr" | |
| fi | |
| done |