Skip to content

Improvement: own inventory support for estimate chest value #28

Improvement: own inventory support for estimate chest value

Improvement: own inventory support for estimate chest value #28

Workflow file for this run

name: "Bug Fix label"
on:
pull_request_target:
types: [ opened,edited ]
jobs:
assign-label:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
contents: read
steps:
- name: label
env:
TITLE: ${{ github.event.pull_request.title }}
LABEL: Bug Fix - Sooner than Very Soon
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN}}
script: |
if(process.env.TITLE.split(":")[0].toUpperCase().includes("FIX")){
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: [process.env.LABEL]
})
}else{
const {data} = await github.rest.issues.listLabelsOnIssue({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
})
const filtered = data.filter(label => label.name == process.env.LABEL)
if(filtered.length == 1){
github.rest.issues.removeLabel({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
name: process.env.LABEL
})
}
}