Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Thunderbird/.github/workflows/   (Thunderbird Email Client Version 5.6©)  Datei vom 22.9.2026 mit Größe 3 kB image not shown  

Quelle  pr-merged.yml  Sprache: unbekannt

 
Spracherkennung für: .yml vermutete Sprache: SQL {SQL[40] VDM[40] VHDL[36]} [Methode: maximale Elemente, drei Dimensionen]

---
name: PR - Merged

# 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:
  pr-merged:
    if: github.event.pull_request.merged
    runs-on: ubuntu-latest
    environment: botmobile
    steps:
      - name: App token generate
        uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510  # v3.3.0
        if: ${{ vars.BOT_CLIENT_ID }}
        id: app-token
        with:
          client-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"
          MILESTONES=$(gh api repos/$GITHUB_REPOSITORY/milestones --jq "
                map(select(.state == \"open\" and .due_on != null))
                | sort_by(.due_on) | reverse")
          MILESTONE_COUNT=$(echo "$MILESTONES" | jq "length")
          if [ "$MILESTONE_COUNT" -ne 3 ]; then
            echo "Expected exactly 3 open milestones with due dates, but found $MILESTONE_COUNT."
            exit 1
          fi
          echo "$MILESTONES" | jq -r "
                .[${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

[Dauer der Verarbeitung: 0.3 Sekunden, vorverarbeitet 2026-10-24]