upstream-api-endpoint-change #109
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: Handle Upstream API Endpoint Change | |
| on: | |
| repository_dispatch: | |
| types: [upstream-api-endpoint-change] | |
| permissions: | |
| issues: write | |
| contents: read | |
| jobs: | |
| create-review-issue: | |
| runs-on: self-hosted | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Create tracking issue | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SOURCE: ${{ github.event.client_payload.source_repo }} | |
| CHANGED: ${{ github.event.client_payload.changed_files }} | |
| COMMIT: ${{ github.event.client_payload.commit }} | |
| run: | | |
| BODY="## Upstream API Endpoint Change | |
| **Source repo**: ${SOURCE} | |
| **Commit**: ${COMMIT} | |
| **Changed files**: ${CHANGED} | |
| ### Review Checklist | |
| - [ ] Check if API reference docs need updating for changed endpoints | |
| - [ ] Verify request/response examples still match actual API behavior | |
| - [ ] Update any new query parameters or headers | |
| - [ ] Add documentation for any new endpoints | |
| - [ ] Update SDK examples if affected | |
| - [ ] Test code examples against live API | |
| ### Context | |
| This issue was auto-created by a \`repository_dispatch\` event from **${SOURCE}**. | |
| API route handlers were modified, which may require documentation updates. | |
| If no action is needed, close this issue with a comment explaining why." | |
| gh issue create \ | |
| --repo "${{ github.repository }}" \ | |
| --title "Upstream API endpoint change from ${SOURCE}" \ | |
| --label "upstream,docs-update" \ | |
| --body "$BODY" || echo "::warning::Issue creation failed" | |
| - name: Log to summary | |
| run: | | |
| echo "## Upstream Notification Received" >> $GITHUB_STEP_SUMMARY | |
| echo "**Source**: ${{ github.event.client_payload.source_repo }}" >> $GITHUB_STEP_SUMMARY | |
| echo "**Changed files**: ${{ github.event.client_payload.changed_files }}" >> $GITHUB_STEP_SUMMARY | |
| echo "**Commit**: ${{ github.event.client_payload.commit }}" >> $GITHUB_STEP_SUMMARY |