From 6c559bfd1a89cbc15f5205fbfeb25b3fd787d275 Mon Sep 17 00:00:00 2001 From: Alexa Louise Date: Sat, 24 Jan 2026 16:54:10 -0600 Subject: [PATCH] add automation bots --- .github/workflows/auto-label.yml | 23 +++++++++++++++++++++++ .github/workflows/failure-issue.yml | 20 ++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 .github/workflows/auto-label.yml create mode 100644 .github/workflows/failure-issue.yml diff --git a/.github/workflows/auto-label.yml b/.github/workflows/auto-label.yml new file mode 100644 index 0000000..c036fbf --- /dev/null +++ b/.github/workflows/auto-label.yml @@ -0,0 +1,23 @@ +name: Auto Label + +on: + pull_request: + types: [opened] + +jobs: + label: + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v7 + with: + script: | + const name = context.repo.repo.toLowerCase() + const labels = [] + if (name.includes("lab")) labels.push("labs") + else labels.push("core") + + await github.rest.issues.addLabels({ + ...context.repo, + issue_number: context.issue.number, + labels + }) diff --git a/.github/workflows/failure-issue.yml b/.github/workflows/failure-issue.yml new file mode 100644 index 0000000..a5d0e80 --- /dev/null +++ b/.github/workflows/failure-issue.yml @@ -0,0 +1,20 @@ +name: CI Failure Tracker + +on: + workflow_run: + workflows: ["CORE CI"] + types: [completed] + +jobs: + report: + if: ${{ github.event.workflow_run.conclusion == 'failure' }} + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v7 + with: + script: | + await github.rest.issues.create({ + ...context.repo, + title: "CI failed: " + context.payload.workflow_run.name, + body: context.payload.workflow_run.html_url + })