|
| 1 | +name: Notify release PMs |
| 2 | + |
| 3 | +# **What it does**: Posts review notification comments on release issues |
| 4 | +# in github/releases for generated GHES release notes. |
| 5 | +# **Why we have it**: So comments are always posted by docs-bot, without |
| 6 | +# needing to distribute a PAT to individual team members. |
| 7 | +# **Who does it impact**: Docs content (GHES release DRIs). |
| 8 | + |
| 9 | +on: |
| 10 | + workflow_dispatch: |
| 11 | + inputs: |
| 12 | + release: |
| 13 | + description: 'GHES release version (e.g., 3.21)' |
| 14 | + type: string |
| 15 | + required: true |
| 16 | + pr: |
| 17 | + description: 'docs-internal PR number containing the release notes' |
| 18 | + type: string |
| 19 | + required: true |
| 20 | + release_type: |
| 21 | + description: 'Release type (auto-detects from files if not specified)' |
| 22 | + type: choice |
| 23 | + options: |
| 24 | + - auto |
| 25 | + - rc |
| 26 | + - ga |
| 27 | + default: 'auto' |
| 28 | + review_date: |
| 29 | + description: 'Override review deadline (YYYY-MM-DD, optional)' |
| 30 | + type: string |
| 31 | + required: false |
| 32 | + dry_run: |
| 33 | + description: 'Preview comments in the workflow log without posting them' |
| 34 | + type: boolean |
| 35 | + default: false |
| 36 | + |
| 37 | +permissions: |
| 38 | + contents: read |
| 39 | + |
| 40 | +jobs: |
| 41 | + notify: |
| 42 | + name: Notify release PMs |
| 43 | + if: github.repository == 'github/docs-internal' |
| 44 | + runs-on: ubuntu-latest |
| 45 | + steps: |
| 46 | + - name: Checkout repository code |
| 47 | + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 |
| 48 | + |
| 49 | + - uses: ./.github/actions/node-npm-setup |
| 50 | + |
| 51 | + - name: Post notification comments |
| 52 | + env: |
| 53 | + DOCS_BOT_PAT_BASE: ${{ secrets.DOCS_BOT_PAT_BASE }} |
| 54 | + INPUT_RELEASE: ${{ inputs.release }} |
| 55 | + INPUT_PR: ${{ inputs.pr }} |
| 56 | + INPUT_RELEASE_TYPE: ${{ inputs.release_type }} |
| 57 | + INPUT_REVIEW_DATE: ${{ inputs.review_date }} |
| 58 | + INPUT_DRY_RUN: ${{ inputs.dry_run }} |
| 59 | + run: | |
| 60 | + args=(--release "$INPUT_RELEASE" --pr "$INPUT_PR") |
| 61 | +
|
| 62 | + if [[ "$INPUT_RELEASE_TYPE" == "rc" ]]; then |
| 63 | + args+=(--rc) |
| 64 | + elif [[ "$INPUT_RELEASE_TYPE" == "ga" ]]; then |
| 65 | + args+=(--ga) |
| 66 | + fi |
| 67 | +
|
| 68 | + if [[ -n "$INPUT_REVIEW_DATE" ]]; then |
| 69 | + args+=(--review-date "$INPUT_REVIEW_DATE") |
| 70 | + fi |
| 71 | +
|
| 72 | + if [[ "$INPUT_DRY_RUN" == "true" ]]; then |
| 73 | + args+=(--dry-run) |
| 74 | + fi |
| 75 | +
|
| 76 | + npm run notify-release-pms -- "${args[@]}" |
0 commit comments