moved glados merger to githubactions

This commit is contained in:
Overtorment 2021-07-27 21:44:28 +01:00
parent 97cacad9d1
commit f47929e07f
2 changed files with 21 additions and 1 deletions

20
.github/workflows/merger.yml vendored Normal file
View File

@ -0,0 +1,20 @@
name: Merges pull requests
on:
schedule:
- cron: '* * * * *'
jobs:
pull-request-reviewer-reminder:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
- name: Install & run
run: |
npm install --production
./node_modules/.bin/ts-node src/main.ts
env:
TOKEN: ${{ secrets.TOKEN }}

View File

@ -27,7 +27,7 @@ async function run(): Promise<void> {
);
if (comments?.data?.length >= 1) {
const filteredComments = comments.data.filter(
(c) => c?.user?.login === "GladosBlueWallet"
(c) => c?.user?.login === "GladosBlueWallet" && c?.body?.includes('HUGE SUCCESS')
);
const deleteMax = filteredComments.length - 1;
let deleted = 0;