send emails stop working after migration for umbraco 15 #18
This file contains hidden or 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: 🏷️ Auto-label by Component | |
on: | |
issues: | |
types: [opened, edited] | |
jobs: | |
label-by-component: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Extract component and apply label | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const componentField = context.payload.issue.body.match(/### Which component is this issue related to\?\n\n(.+)/); | |
if (!componentField) return; | |
const componentMap = { | |
"Umbraco Commerce (Core)": "component/commerce", | |
"Payment Provider": "component/payment-provider", | |
"Shipping Provider": "component/shipping-provider", | |
"Sales Tax Provider": "component/sales-tax-provider", | |
"Deploy": "component/deploy", | |
"Checkout": "component/checkout", | |
"Cart": "component/cart", | |
"Demo Store": "component/demo", | |
"Other / Not sure": "component/other" | |
}; | |
const selected = componentField[1].trim(); | |
const label = componentMap[selected]; | |
if (label) { | |
await github.rest.issues.addLabels({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
labels: [label] | |
}); | |
} |