diff --git a/.github/workflows/pr-description.yml b/.github/workflows/pr-description.yml index e38ba5037..292134f60 100644 --- a/.github/workflows/pr-description.yml +++ b/.github/workflows/pr-description.yml @@ -1,8 +1,13 @@ -name: ๐Ÿงผ PR Description +name: ๐Ÿงผ PR on: pull_request: - types: [opened, edited, synchronize] + types: + - demilestoned + - edited + - milestoned + - opened + - synchronize permissions: {} @@ -45,3 +50,18 @@ jobs: } else { console.log('โœ… PR description and checklist look good.'); } + + has-milestone: + name: Has Milestone + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v7 + with: + script: | + // Get the pull request data + const milestone = context.payload.pull_request.milestone; + if (!milestone) { + core.setFailed('โŒ Pull request must have a milestone assigned before merging.'); + return; + } + console.log(`โœ… Milestone found: ${milestone.title}`);