1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-02-03 13:11:48 +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.4.1 to 7.0.0 (#4424) Bumps [actions/github-script](https://github.com/actions/github-script) from 6.4.1 to 7.0.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>v7.0.0</h2> <h2>What's Changed</h2> <ul> <li>Add base-url option by <a href="https://github.com/robandpdx"><code>@​robandpdx</code></a> in <a href="https://redirect.github.com/actions/github-script/pull/429">actions/github-script#429</a></li> <li>Expose async-function argument type by <a href="https://github.com/viktorlott"><code>@​viktorlott</code></a> in <a href="https://redirect.github.com/actions/github-script/pull/402">actions/github-script#402</a>, see for details <a href="https://github.com/actions/github-script#use-scripts-with-jsdoc-support">https://github.com/actions/github-script#use-scripts-with-jsdoc-support</a></li> <li>Update dependencies and use Node 20 by <a href="https://github.com/joshmgross"><code>@​joshmgross</code></a> in <a href="https://redirect.github.com/actions/github-script/pull/425">actions/github-script#425</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/navarroaxel"><code>@​navarroaxel</code></a> made their first contribution in <a href="https://redirect.github.com/actions/github-script/pull/285">actions/github-script#285</a></li> <li><a href="https://github.com/robandpdx"><code>@​robandpdx</code></a> made their first contribution in <a href="https://redirect.github.com/actions/github-script/pull/429">actions/github-script#429</a></li> <li><a href="https://github.com/viktorlott"><code>@​viktorlott</code></a> made their first contribution in <a href="https://redirect.github.com/actions/github-script/pull/402">actions/github-script#402</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/github-script/compare/v6.4.1...v7.0.0">https://github.com/actions/github-script/compare/v6.4.1...v7.0.0</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/actions/github-script/commit/e69ef5462fd455e02edcaf4dd7708eda96b9eda0"><code>e69ef54</code></a> Merge pull request <a href="https://redirect.github.com/actions/github-script/issues/425">#425</a> from actions/joshmgross/node-20</li> <li><a href="https://github.com/actions/github-script/commit/ee0914b839b704083a749f8c77a73a9270674a32"><code>ee0914b</code></a> Update licenses</li> <li><a href="https://github.com/actions/github-script/commit/d6fc56f33b017d55917d045da1a94efa2120f039"><code>d6fc56f</code></a> Use <code>@types/node</code> for Node 20</li> <li><a href="https://github.com/actions/github-script/commit/384d6cf581452587d1e31f553c97ab165427124a"><code>384d6cf</code></a> Fix quotations in tests</li> <li><a href="https://github.com/actions/github-script/commit/84724927e3e992f17768c17f57a47a85ea2a5160"><code>8472492</code></a> Only validate GraphQL <code>previews</code></li> <li><a href="https://github.com/actions/github-script/commit/84903f51828821af5d03d3884c6ba699a2d44d6e"><code>84903f5</code></a> Remove <code>node-fetch</code> from type</li> <li><a href="https://github.com/actions/github-script/commit/5349cf9965bcbf8805b972feaf11ed678b890486"><code>5349cf9</code></a> Merge branch 'main' into joshmgross/node-20</li> <li><a href="https://github.com/actions/github-script/commit/ecae9eb5354bb50ec47c128d372ed4735e630703"><code>ecae9eb</code></a> Merge pull request <a href="https://redirect.github.com/actions/github-script/issues/402">#402</a> from typed-actions/export-types</li> <li><a href="https://github.com/actions/github-script/commit/044ebbb94591db039a428f61a178e6f8168c4ffc"><code>044ebbb</code></a> Merge branch 'main' into export-types</li> <li><a href="https://github.com/actions/github-script/commit/6b5d3eac1fb48c23fcd665e5a63baced5392d8ce"><code>6b5d3ea</code></a> Merge pull request <a href="https://redirect.github.com/actions/github-script/issues/429">#429</a> from robandpdx/add-base-url-option</li> <li>Additional commits viewable in <a href="https://github.com/actions/github-script/compare/d7906e4ad0b1822421a7e6a35d5ca353c962f410...e69ef5462fd455e02edcaf4dd7708eda96b9eda0">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.4.1&new-version=7.0.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 show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@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>
2023-11-14 07:15:57 -03:00
- uses: actions/github-script@e69ef5462fd455e02edcaf4dd7708eda96b9eda0 # 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
});