1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-10 03:47:03 +02:00
goreleaser/.github/workflows/milestone.yml

59 lines
1.6 KiB
YAML
Raw Normal View History

# shamelessly copied from https://github.com/sigstore/cosign/blob/main/.github/workflows/milestone.yaml
name: milestone
on:
pull_request_target:
types: [closed]
branches:
- main
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:
chore(deps): bump actions/github-script from 6.2.0 to 6.3.0 (#3408) Bumps [actions/github-script](https://github.com/actions/github-script) from 6.2.0 to 6.3.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions/github-script/releases">actions/github-script's releases</a>.</em></p> <blockquote> <h2>v6.3.0</h2> <h2>What's Changed</h2> <ul> <li>Add retry plugin and related options by <a href="https://github.com/luketomlinson"><code>@​luketomlinson</code></a> in <a href="https://github-redirect.dependabot.com/actions/github-script/pull/288">actions/github-script#288</a>, see <a href="https://github.com/actions/github-script/tree/v6.3.0#retries">https://github.com/actions/github-script/tree/v6.3.0#retries</a> for more information.</li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/luketomlinson"><code>@​luketomlinson</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/actions/github-script/pull/288">actions/github-script#288</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/github-script/compare/v6.2.0...v6.3.0">https://github.com/actions/github-script/compare/v6.2.0...v6.3.0</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/actions/github-script/commit/d4560e157075e2d93aa3022b5b51a42a880f1f93"><code>d4560e1</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/actions/github-script/issues/288">#288</a> from luketomlinson/main</li> <li><a href="https://github.com/actions/github-script/commit/d7426903070f4480cc98bbe52fb6ee1e8460734e"><code>d742690</code></a> 6.3.0</li> <li><a href="https://github.com/actions/github-script/commit/ac0c7cb50b90e49fbfba7938a35accf759c1a1b1"><code>ac0c7cb</code></a> Core.debug</li> <li><a href="https://github.com/actions/github-script/commit/eb0f407f1a3d0bdb55f105755f501f0777cb6ca2"><code>eb0f407</code></a> Whitespace</li> <li><a href="https://github.com/actions/github-script/commit/6b09a22cca81d37a9daeaae8a3695d0783b2efe7"><code>6b09a22</code></a> cleanup quotes</li> <li><a href="https://github.com/actions/github-script/commit/e7dbaf05653e9eea501c1edde284187ac76146f3"><code>e7dbaf0</code></a> update action.yml</li> <li><a href="https://github.com/actions/github-script/commit/3faaff918c906b6cea99ea96cccf632a95f81e0a"><code>3faaff9</code></a> PR feedback</li> <li><a href="https://github.com/actions/github-script/commit/3cca041b86e74cd85b350bbb3455887c74246d79"><code>3cca041</code></a> Fix http-client license</li> <li><a href="https://github.com/actions/github-script/commit/55053af80a7e74f914eb8f5995ca569e403f7435"><code>55053af</code></a> Update licenses</li> <li><a href="https://github.com/actions/github-script/commit/977060a05efd7ef0bc7a94461f1e77705ba5472a"><code>977060a</code></a> Add more info to action.yml</li> <li>Additional commits viewable in <a href="https://github.com/actions/github-script/compare/c713e510dbd7d213d92d41b7a7805a986f4c5c66...d4560e157075e2d93aa3022b5b51a42a880f1f93">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/github-script&package-manager=github_actions&previous-version=6.2.0&new-version=6.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-27 15:58:22 +02:00
- uses: actions/github-script@d4560e157075e2d93aa3022b5b51a42a880f1f93 # v6
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
});