🕋 Adds actions for managing PRs, issues and comments

This commit is contained in:
Alicia Sykes 2021-09-08 20:10:54 +01:00
parent f14d1ce978
commit bb25389a71
4 changed files with 68 additions and 0 deletions

View File

@ -0,0 +1,27 @@
# Based on a label applied to an issue, the bot will add a comment with some additional info
name: Post Status from Label
on:
issues:
types:
- labeled
- unlabeled
pull_request_target:
types:
- labeled
- unlabeled
permissions:
contents: read
issues: write
pull-requests: write
jobs:
comment:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Label Commenter
uses: peaceiris/actions-label-commenter@v1
with:
github_token: ${{ secrets.BOT_GITHUB_TOKEN }}
config_file: ./path_to/your_config.yml

17
.github/workflows/auto-tag-pr.yml vendored Normal file
View File

@ -0,0 +1,17 @@
# Creates a new tag, whenever the app version (in package.json) is updated in master
name: Create Tag
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: butlerlogic/action-autotag@stable
with:
tag_prefix: v
strategy: package
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
commit_message_template: "🔖 {{number}} {{message}} (by {{author}})\nSHA: {{sha}}\n."

View File

@ -0,0 +1,13 @@
# Finds any TODO notes within the code, and opens up an issue for it to be fixed
name: Open issue for Todos
on: ["push"]
jobs:
build:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@master"
- name: "TODO to Issue"
uses: "alstr/todo-to-issue-action@v4.2"
id: "todo"
with:
TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}

View File

@ -0,0 +1,11 @@
# After a PR is merged, the linked issue will be updated with a comment, based on commit message
name: Update Issue After PR
on: push
jobs:
checkCommit:
name: Comment From Commit
runs-on: ubuntu-latest
steps:
- uses: adamzolyak/commit-issue-commenter-action@master
env:
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}