mirror of
https://github.com/blackboxprogramming/blackroad-roadworld.git
synced 2026-03-17 06:27:12 -05:00
add automation bots
This commit is contained in:
23
.github/workflows/auto-label.yml
vendored
Normal file
23
.github/workflows/auto-label.yml
vendored
Normal file
@@ -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
|
||||
})
|
||||
20
.github/workflows/failure-issue.yml
vendored
Normal file
20
.github/workflows/failure-issue.yml
vendored
Normal file
@@ -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
|
||||
})
|
||||
Reference in New Issue
Block a user