Skip to content
This repository has been archived by the owner on Nov 6, 2023. It is now read-only.

[Task]: Restrict CI workflow runs on push events only to the development branches #524

[Task]: Restrict CI workflow runs on push events only to the development branches

[Task]: Restrict CI workflow runs on push events only to the development branches #524

on:
issues:
types: [opened]
jobs:
apply-label:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v4
with:
script: |
var body = context.payload.issue.body
var words = body.split(" ");
console.log(words)
for (var i = 0; i < words.length - 1; i++) {
var word = words[i]
if(word.startsWith('Name\n\nmodule/') | word.startsWith('Name\n\nconnectors/') | word.startsWith('Name\n\ntools/')) {
var label = word.substring(6)
console.log(label)
github.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: [label]
})
break
}
}