Collapsed factory summary surplus not accounting for internal materials #635
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Issue Management" | |
on: | |
issues: | |
types: [opened, labeled, unlabeled] | |
jobs: | |
manage-issues: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: New issue, add Needs Triage label | |
if: github.event.action == 'opened' | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
await github.rest.issues.addLabels({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
labels: ['Needs Triage'] | |
}) | |
- name: P1 Label added | |
if: github.event.action == 'labeled' && contains(github.event.label.name, 'P1') | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const label = context.payload.label.name; | |
if (label === 'P1') { | |
const issue = context.issue; | |
if (labels.data.some(l => l.name === 'Needs Triage')) { | |
await github.rest.issues.removeLabel({ | |
issue_number: issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
name: 'Needs Triage' | |
}); | |
} | |
} | |
- name: P1 Label removed | |
if: github.event.action == 'unlabeled' | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const label = context.payload.label.name; | |
if (label === 'P1') { | |
const issue = context.issue; | |
if (labels.data.some(l => l.name === 'Needs Triage')) { | |
await github.rest.issues.removeLabel({ | |
issue_number: issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
name: 'Needs Triage' | |
}); | |
} | |
} | |
- name: P2 or P3 Label added, Remove Needs Triage label | |
if: github.event.action == 'labeled' && (contains(github.event.label.name, 'P2') || contains(github.event.label.name, 'P3')) | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const issue = context.issue; | |
if (labels.data.some(l => l.name === 'Needs Triage')) { | |
await github.rest.issues.removeLabel({ | |
issue_number: issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
name: 'Needs Triage' | |
}); | |
} | |