rework hallucinated milestone check

This commit is contained in:
Guillaume Ballet 2025-08-22 09:40:09 +02:00 committed by GitHub
parent d4f8daec22
commit 3c8a0a0e04
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -26,7 +26,12 @@ jobs:
uses: actions/github-script@v7 uses: actions/github-script@v7
with: with:
script: | script: |
const milestone = context.payload.pull_request.milestone; // Fetch the PR data explicitly to ensure we have milestone info
const { data: pr } = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number
});
if (!milestone) { if (!milestone) {
core.setFailed('PR must have a milestone assigned'); core.setFailed('PR must have a milestone assigned');