fix(management): preserve callback forwarder reuse and cleanup generated artifacts #25
Workflow file for this run
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: translator-path-guard | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| jobs: | |
| ensure-no-translator-changes: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Detect maintainer override | |
| id: maintainer-override | |
| run: | | |
| case "${{ github.event.pull_request.author_association }}" in | |
| OWNER|MEMBER|COLLABORATOR) | |
| echo "allowed=true" >> "$GITHUB_OUTPUT" | |
| ;; | |
| *) | |
| echo "allowed=false" >> "$GITHUB_OUTPUT" | |
| ;; | |
| esac | |
| - name: Detect internal/translator changes | |
| id: changed-files | |
| uses: tj-actions/changed-files@48d8f15b2aaa3d255ca5af3eba4870f807ce6b3c # v45 | |
| with: | |
| files: | | |
| internal/translator/** | |
| - name: Fail when restricted paths change | |
| if: steps.changed-files.outputs.any_changed == 'true' && steps.maintainer-override.outputs.allowed != 'true' | |
| run: | | |
| echo "Changes under internal/translator are not allowed in pull requests." | |
| echo "You need to create an issue for our maintenance team to make the necessary changes." | |
| exit 1 | |
| - name: Note maintainer override | |
| if: steps.changed-files.outputs.any_changed == 'true' && steps.maintainer-override.outputs.allowed == 'true' | |
| run: echo "Translator changes detected, but maintainer-authored PRs are allowed to proceed." |