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.0 to 6.4.1 (#3973) Bumps [actions/github-script](https://github.com/actions/github-script) from 6.4.0 to 6.4.1. <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.4.1</h2> <h2>What's Changed</h2> <ul> <li>Add <code>@​octokit/plugin-request-log</code>, to produce debug output for requests by <a href="https://github.com/mjpieters"><code>@​mjpieters</code></a> in <a href="https://redirect.github.com/actions/github-script/pull/358">actions/github-script#358</a></li> <li>fix input handling by <a href="https://github.com/mjpieters"><code>@​mjpieters</code></a> in <a href="https://redirect.github.com/actions/github-script/pull/357">actions/github-script#357</a></li> <li>Remove unused dependencies by <a href="https://github.com/mjpieters"><code>@​mjpieters</code></a> in <a href="https://redirect.github.com/actions/github-script/pull/356">actions/github-script#356</a></li> <li>Default debug to current runner debug state by <a href="https://github.com/mjpieters"><code>@​mjpieters</code></a> in <a href="https://redirect.github.com/actions/github-script/pull/363">actions/github-script#363</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/mjpieters"><code>@​mjpieters</code></a> made their first contribution in <a href="https://redirect.github.com/actions/github-script/pull/358">actions/github-script#358</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/github-script/compare/v6.4.0...v6.4.1">https://github.com/actions/github-script/compare/v6.4.0...v6.4.1</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/actions/github-script/commit/d7906e4ad0b1822421a7e6a35d5ca353c962f410"><code>d7906e4</code></a> Merge pull request <a href="https://redirect.github.com/actions/github-script/issues/363">#363</a> from mjpieters/auto_debug</li> <li><a href="https://github.com/actions/github-script/commit/ea954ff83a8f419ea2290da1ae2e44ed5a26b800"><code>ea954ff</code></a> Default debug to current runner debug state</li> <li><a href="https://github.com/actions/github-script/commit/57c10d434ec3b7112b3635cd63771978bcfc50dc"><code>57c10d4</code></a> Merge pull request <a href="https://redirect.github.com/actions/github-script/issues/356">#356</a> from mjpieters/clean_deps</li> <li><a href="https://github.com/actions/github-script/commit/eae7dc1b886f46162f731a9117683be74bc8dd87"><code>eae7dc1</code></a> Merge branch 'main' into clean_deps</li> <li><a href="https://github.com/actions/github-script/commit/f1ab5779d684a7e94d37fcef88d2e24d4d9d0911"><code>f1ab577</code></a> Merge pull request <a href="https://redirect.github.com/actions/github-script/issues/357">#357</a> from mjpieters/fix_input_handling</li> <li><a href="https://github.com/actions/github-script/commit/8d9f8fc050d038eac46e34e317ca8dc9b3a83e71"><code>8d9f8fc</code></a> Fix null handling, covered by integration tests</li> <li><a href="https://github.com/actions/github-script/commit/a4f398e58be52b7c1ec930d635a6768f94fde1fe"><code>a4f398e</code></a> Remove unused dependencies</li> <li><a href="https://github.com/actions/github-script/commit/806be26275e9f355e2644b1e8e22e1a546714375"><code>806be26</code></a> Clean and spruce up the integration tests a bit</li> <li><a href="https://github.com/actions/github-script/commit/8d76c9a9134fecb44ef7d530c839da2d1974d0bb"><code>8d76c9a</code></a> Merge pull request <a href="https://redirect.github.com/actions/github-script/issues/358">#358</a> from mjpieters/request-log-plugin</li> <li><a href="https://github.com/actions/github-script/commit/78f623b2da4a81b2f2dfa2e74dc3cf02ded4cfed"><code>78f623b</code></a> Add <code>@​octokit/plugin-request-log</code>, to produce debug output for requests</li> <li>See full diff in <a href="https://github.com/actions/github-script/compare/98814c53be79b1d30f795b907e553d8679345975...d7906e4ad0b1822421a7e6a35d5ca353c962f410">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.0&new-version=6.4.1)](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>
2023-05-02 09:30:17 -03:00
- uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # 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
});