upflit(beta): fix: avatar image uri (#10500) #36
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: PR Opened Actions | |
| # Warning, this job is running on pull_request_target and therefore has access to issue content. | |
| # Don't add any steps that act on external code. | |
| on: | |
| pull_request_target: | |
| branches: [beta, release] | |
| types: [opened] | |
| permissions: | |
| pull-requests: write | |
| jobs: | |
| pull-request-opened: | |
| runs-on: ubuntu-latest | |
| environment: botmobile | |
| steps: | |
| - name: App token generate | |
| uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1 | |
| if: ${{ vars.BOT_CLIENT_ID }} | |
| id: app-token | |
| with: | |
| app-id: ${{ vars.BOT_CLIENT_ID }} | |
| private-key: ${{ secrets.BOT_PRIVATE_KEY }} | |
| - name: Uplift Approval Request | |
| env: | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| GH_TOKEN: ${{ steps.app-token.outputs.token || github.token }} | |
| MILESTONE: ${{ steps.milestone.outputs.title }} | |
| MESSAGE: | | |
| Thank you for your uplift request! Please add a comment with the following approval request template filled out. | |
| **[Approval Request]** | |
| Original Issue/Pull request: | |
| Regression caused by (issue #): | |
| User impact if declined: | |
| Testing completed (on daily, beta, etc.): | |
| Introduces or modifies localizable strings (yes/no): | |
| Skips a database migration (yes/no): | |
| Risk to taking this patch (and alternatives if risky): | |
| run: | | |
| if gh pr view "$PR_NUMBER" --repo "$GITHUB_REPOSITORY" --json comments \ | |
| --jq '.comments[].body' | grep -q '\[Approval Request\]'; then | |
| echo "Approval Request already exists. Skipping comment." | |
| exit 0 | |
| fi | |
| gh pr comment "$PR_NUMBER" --repo "$GITHUB_REPOSITORY" --body "$MESSAGE" |