forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (47 loc) · 1.9 KB
/
ghostbuster.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Remove contributors with deleted accounts
on:
schedule:
# https://crontab.guru/#0_0_*_*_1
- cron: "0 0 * * 1"
workflow_dispatch:
inputs:
skipPR:
description: Push results straight to master instead of opening a PR
required: false
default: "false"
jobs:
ghostbust:
runs-on: ubuntu-latest
if: github.repository == 'DefinitelyTyped/DefinitelyTyped'
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v2
- run: npm install --no-package-lock
- run: node ./scripts/ghostbuster.cjs
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_API_READ }}
- if: ${{ inputs.skipPR == 'true' }}
run: |
if [ -n "`git status -s`" ]; then
git config --global user.email "[email protected]"
git config --global user.name "TypeScript Bot"
git commit -am "Remove contributors with deleted accounts #no-publishing-comment"
# Script can take a bit to run; with such an active repo there's a good chance
# someone has merged a PR in that time.
git pull --rebase
git push
fi
- if: ${{ inputs.skipPR != 'true' }}
uses: peter-evans/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Remove contributors with deleted accounts #no-publishing-comment"
committer: "TypeScript Bot <[email protected]>"
author: "TypeScript Bot <[email protected]>"
branch: "bust-ghosts"
branch-suffix: short-commit-hash
delete-branch: true
title: Remove contributors with deleted accounts
body: "Generated from [.github/workflows/ghostbuster.yml](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/.github/workflows/ghostbuster.yml)"