aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-07-07 01:21:49 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-07-07 01:21:49 +0200
commit0cfd7cd8d9c235d96732162580529d36afd33c2e (patch)
treeaff4b44d03a3c7fe6cf7460554754c4d804812ce /.github/workflows
parent6b76ba0b899b4a733955f9f18c8382de7d6b5b87 (diff)
downloadskyhanni-0cfd7cd8d9c235d96732162580529d36afd33c2e.tar.gz
skyhanni-0cfd7cd8d9c235d96732162580529d36afd33c2e.tar.bz2
skyhanni-0cfd7cd8d9c235d96732162580529d36afd33c2e.zip
fix label bug fix
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/label-bug-fix.yml43
1 files changed, 21 insertions, 22 deletions
diff --git a/.github/workflows/label-bug-fix.yml b/.github/workflows/label-bug-fix.yml
index 23ca3af81..bfef0bd04 100644
--- a/.github/workflows/label-bug-fix.yml
+++ b/.github/workflows/label-bug-fix.yml
@@ -1,7 +1,7 @@
name: "Bug Fix label"
on:
pull_request:
- types: [ opened,edited ]
+ types: [ opened, edited ]
jobs:
assign-label:
runs-on: ubuntu-latest
@@ -10,31 +10,30 @@ jobs:
env:
TITLE: ${{ github.event.pull_request.title }}
LABEL: Bug Fix - Sooner than Very Soon
+ repoToken: "${{ secrets.GITHUB_TOKEN }}"
uses: actions/github-script@v7
with:
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]
- })
+ 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 {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
})
- 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
- })
- }
+ }
}
-
-