Skip to content

Commit

Permalink
Committing changes (#528)
Browse files Browse the repository at this point in the history
Co-authored-by: dependjinbot <dependjinbot@endjin.com>
  • Loading branch information
dependjinbot[bot] and dependjinbot authored Jun 28, 2023
1 parent 083e375 commit 65d072b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/auto_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,16 @@ jobs:
core.info("labels: " + JSON.stringify(labels.data))
if ( labels.data.map(l => l.name).includes("no_release") ) {
core.info("Label found")
if ( labels.data.map(l => l.name).includes("pending_release") ) {
// Remove the 'pending_release' label
await github.rest.issues.removeLabel({
owner: context.payload.repository.owner.login,
repo: context.payload.repository.name,
issue_number: context.payload.pull_request.number,
name: 'pending_release'
})
}
return true
}
return false
Expand Down Expand Up @@ -118,11 +128,13 @@ jobs:
releasePendingPrDetails = pulls.data.items.
filter(function (x) { return x.labels.map(l=>l.name).includes('pending_release') }).
filter(function (x) { return !x.labels.map(l=>l.name).includes('no_release') }).
map(p=>`#${p.number} '${p.title}' in ${p.repository_url}`);
core.info(`releasePendingPrDetails: ${JSON.stringify(releasePendingPrDetails)}`);
const release_pending_prs = pulls.data.items.
filter(function (x) { return x.labels.map(l=>l.name).includes('pending_release') }).
filter(function (x) { return !x.labels.map(l=>l.name).includes('no_release') }).
map(p=>p.number);
core.info(`release_pending_prs: ${JSON.stringify(release_pending_prs)}`);
core.setOutput('is_release_pending', (release_pending_prs.length > 0));
Expand Down

0 comments on commit 65d072b

Please sign in to comment.