publish: getsentry/sentry-protos@0.37.1 #6740
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: auto-approve non-sdks | |
| on: | |
| issues: | |
| types: [opened] | |
| permissions: | |
| contents: read | |
| jobs: | |
| auto-approve: | |
| runs-on: ubuntu-latest | |
| if: | | |
| (github.actor == 'sentry-release-bot[bot]' || github.actor == 'getsantry[bot]') && | |
| startsWith(github.event.issue.title, 'publish: ') | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| sparse-checkout: auto-approve-repos.txt | |
| sparse-checkout-cone-mode: false | |
| - name: Get auth token | |
| id: token | |
| uses: actions/create-github-app-token@v3 | |
| with: | |
| client-id: ${{ vars.SENTRY_INTERNAL_APP_ID }} | |
| private-key: ${{ secrets.SENTRY_INTERNAL_APP_PRIVATE_KEY }} | |
| - name: Auto-approve if repo is in the list | |
| env: | |
| GH_TOKEN: ${{ steps.token.outputs.token }} | |
| ISSUE_TITLE: ${{ github.event.issue.title }} | |
| ISSUE_URL: ${{ github.event.issue.html_url }} | |
| run: | | |
| REPO=$(echo "$ISSUE_TITLE" | sed -n 's/^publish: \(.*\)@.*/\1/p') | |
| if [ -n "$REPO" ] && grep -qxF "$REPO" auto-approve-repos.txt; then | |
| gh issue edit "$ISSUE_URL" --add-label accepted | |
| fi |