summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Nate Moore <natemoo-re@users.noreply.github.com> 2023-07-17 14:14:33 -0500
committerGravatar GitHub <noreply@github.com> 2023-07-17 14:14:33 -0500
commitb1005af70587bb2950470917ad1340b9c507e781 (patch)
tree93cc700c3b06a63a271b1e1061e51fef871e1bb1
parent5e26faa86441ffafad94565a3f6b73e5da97cd57 (diff)
downloadastro-b1005af70587bb2950470917ad1340b9c507e781.tar.gz
astro-b1005af70587bb2950470917ad1340b9c507e781.tar.zst
astro-b1005af70587bb2950470917ad1340b9c507e781.zip
Update Action labels (#7688)
* chore: update action labels * chore: add label actions
-rw-r--r--.github/labeler.yml22
-rw-r--r--.github/workflows/check-merge.yml2
-rw-r--r--.github/workflows/issue-labeled.yml32
-rw-r--r--.github/workflows/issue-needs-repro.yml18
-rw-r--r--.github/workflows/issue-opened.yml23
5 files changed, 85 insertions, 12 deletions
diff --git a/.github/labeler.yml b/.github/labeler.yml
index 185c6dd3e..82638ac7f 100644
--- a/.github/labeler.yml
+++ b/.github/labeler.yml
@@ -1,37 +1,37 @@
# See https://github.com/actions/labeler
-example:
+'pkg: example':
- examples/**/*
'🚨 action':
- .github/workflows/**
-core:
+'pkg: astro':
- packages/astro/**
-create-astro:
+'pkg: create-astro':
- packages/create-astro/**
-markdown:
+'feat: markdown':
- packages/markdown/**
-integration:
+'pkg: integration':
- packages/integrations/**
-framework-lit:
+'pkg: lit':
- packages/integrations/lit/**
-framework-preact:
+'pkg: preact':
- packages/integrations/preact/**
-framework-react:
+'pkg: react':
- packages/integrations/react/**
-framework-solid:
+'pkg: solid':
- packages/integrations/solid/**
-framework-svelte:
+'pkg: svelte':
- packages/integrations/svelte/**
-framework-vue:
+'pkg: vue':
- packages/integrations/vue/**
diff --git a/.github/workflows/check-merge.yml b/.github/workflows/check-merge.yml
index 4800601ba..378c59527 100644
--- a/.github/workflows/check-merge.yml
+++ b/.github/workflows/check-merge.yml
@@ -69,7 +69,7 @@ jobs:
issue_number: process.env.issue_number,
owner: context.repo.owner,
repo: context.repo.repo,
- labels: ['semver minor']
+ labels: ['semver: minor']
});
- name: Change PR Status
diff --git a/.github/workflows/issue-labeled.yml b/.github/workflows/issue-labeled.yml
new file mode 100644
index 000000000..853455ef3
--- /dev/null
+++ b/.github/workflows/issue-labeled.yml
@@ -0,0 +1,32 @@
+name: Issue Labeled
+
+on:
+ issues:
+ types: [labeled]
+
+jobs:
+ reply-labeled:
+ if: github.repository == 'withastro/astro'
+ runs-on: ubuntu-latest
+ steps:
+ - name: remove triage
+ if: |
+ ${{ contains(github.event.label.description, '(priority)') && contains(github.event.issue.labels.*.name, 'needs: triage') }}
+ uses: actions-cool/issues-helper@v3
+ with:
+ actions: "remove-labels"
+ token: ${{ secrets.GITHUB_TOKEN }}
+ issue-number: ${{ github.event.issue.number }}
+ labels: "needs: triage"
+
+ - name: needs repro
+ if: |
+ ${{ github.event.label.name == 'needs: repro' }}
+ uses: actions-cool/issues-helper@v3
+ with:
+ actions: "create-comment, remove-labels"
+ token: ${{ secrets.GITHUB_TOKEN }}
+ issue-number: ${{ github.event.issue.number }}
+ body: |
+ Hello @${{ github.event.issue.user.login }}. Please provide a [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) using a GitHub repository or [StackBlitz](https://astro.new). Issues marked with `needs: repro` will be closed if they have no activity within 3 days.
+ labels: "needs: triage"
diff --git a/.github/workflows/issue-needs-repro.yml b/.github/workflows/issue-needs-repro.yml
new file mode 100644
index 000000000..47b73ac5b
--- /dev/null
+++ b/.github/workflows/issue-needs-repro.yml
@@ -0,0 +1,18 @@
+name: Close Issues (needs repro)
+
+on:
+ schedule:
+ - cron: "0 0 * * *"
+
+jobs:
+ close-issues:
+ if: github.repository == 'withastro/astro'
+ runs-on: ubuntu-latest
+ steps:
+ - name: needs repro
+ uses: actions-cool/issues-helper@v3
+ with:
+ actions: "close-issues"
+ token: ${{ secrets.GITHUB_TOKEN }}
+ labels: "needs: repro"
+ inactive-day: 3
diff --git a/.github/workflows/issue-opened.yml b/.github/workflows/issue-opened.yml
new file mode 100644
index 000000000..83e195cd9
--- /dev/null
+++ b/.github/workflows/issue-opened.yml
@@ -0,0 +1,23 @@
+name: Label issues
+on:
+ issues:
+ types:
+ - reopened
+ - opened
+
+jobs:
+ label_issues:
+ runs-on: ubuntu-latest
+ if: github.repository == 'withastro/astro'
+ permissions:
+ issues: write
+ steps:
+ - uses: actions/github-script@v6
+ with:
+ script: |
+ github.rest.issues.addLabels({
+ issue_number: context.issue.number,
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ labels: ["needs: triage"]
+ })