chore(deps): bump gradle-wrapper from 9.2.1 to 9.3.1 #778
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: PR Merged 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: [main, beta, release] | |
| types: [closed] | |
| permissions: | |
| pull-requests: write | |
| issues: write | |
| jobs: | |
| pull-request-merged: | |
| if: github.event.pull_request.merged | |
| 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: Get active milestone | |
| id: milestone | |
| env: | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| GH_TOKEN: ${{ steps.app-token.outputs.token || github.token }} | |
| run: | | |
| # There should be exactly 3 milestones open at all times | |
| TARGET_BRANCH="${{ github.base_ref }}" | |
| case "$TARGET_BRANCH" in | |
| main) milestone_index=0 ;; | |
| beta) milestone_index=1 ;; | |
| release) milestone_index=2 ;; | |
| esac | |
| echo "$milestone_index" | |
| gh api repos/$GITHUB_REPOSITORY/milestones --jq " | |
| map(select(.state == \"open\" and .due_on != null)) | |
| | sort_by(.due_on) | reverse | |
| | .[${milestone_index}] | { number, title } | |
| | to_entries | |
| | map(.key + \"=\" + (.value|tostring)) | join(\"\n\")" | tee -a $GITHUB_OUTPUT | |
| - name: Thank you | |
| if: | | |
| github.base_ref == 'main' && | |
| github.event.pull_request.author_association != 'OWNER' && | |
| github.event.pull_request.author_association != 'MEMBER' && | |
| github.event.pull_request.author_association != 'COLLABORATOR' && | |
| github.event.pull_request.author_association != 'CONTRIBUTOR' | |
| env: | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| GH_TOKEN: ${{ steps.app-token.outputs.token || github.token }} | |
| MILESTONE: ${{ steps.milestone.outputs.title }} | |
| MESSAGE: >- | |
| Thanks for your contribution! Your pull request has been merged and will be part of | |
| ${{ steps.milestone.outputs.title }}. We appreciate the time and effort you put into | |
| improving Thunderbird. If you haven’t already, you’re welcome to join our Matrix chat | |
| for contributors. It’s where we discuss development and help each other out. | |
| https://matrix.to/#/#tb-android-dev:mozilla.org | |
| Hope to see you there! 🚀📱🐦 | |
| run: | | |
| gh pr comment $PR_NUMBER --repo $GITHUB_REPOSITORY --body "$MESSAGE" | |
| - name: Set active milestone on PR | |
| env: | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| GH_TOKEN: ${{ steps.app-token.outputs.token || github.token }} | |
| MILESTONE: ${{ steps.milestone.outputs.number }} | |
| run: | | |
| gh api --method PATCH /repos/$GITHUB_REPOSITORY/issues/$PR_NUMBER -f milestone=$MILESTONE |