Skip to content

build(deps): Bump google-github-actions/auth from 2.1.6 to 2.1.7 in the all group #1468

build(deps): Bump google-github-actions/auth from 2.1.6 to 2.1.7 in the all group

build(deps): Bump google-github-actions/auth from 2.1.6 to 2.1.7 in the all group #1468

Workflow file for this run

name: Milestone
on:
pull_request_target:
types: [closed]
branches:
- main
- 'release-**'
jobs:
milestone:
runs-on: ubuntu-latest
permissions:
actions: none
checks: none
contents: read
deployments: none
issues: write
packages: none
pull-requests: write
repository-projects: none
security-events: none
statuses: none
steps:
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
if (!context.payload.pull_request.merged) {
console.log('PR was not merged, skipping.');
return;
}
if (!!context.payload.pull_request.milestone) {
console.log('PR has existing milestone, skipping.');
return;
}
milestones = await github.rest.issues.listMilestones({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
sort: 'due_on',
direction: 'asc'
})
if (milestones.data.length === 0) {
console.log('There are no milestones, skipping.');
return;
}
await github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
milestone: milestones.data[0].number
});