-
Notifications
You must be signed in to change notification settings - Fork 13
52 lines (51 loc) · 1.9 KB
/
generate-transcript.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
name: Generate TSC Meeting Transcript
on:
issues:
types: [closed]
jobs:
generate-trancript:
runs-on: ubuntu-latest
if: contains(github.event.issue.labels.*.name, 'tsc meeting')
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: Install dependencies
run: npm install
- name: Generate transcript
run: npm run generate:transcript
env:
TOKEN: ${{ secrets.DISCORD_BOT_TOKEN }}
ID: ${{ secrets.DISCORD_CHANNEL_ID }}
ISSUE_TITLE: ${{ github.event.issue.title }}
- name: Configure Git identity
run: |
git config user.email "eslint[bot]@users.noreply.github.com"
git config user.name "ESLint Bot"
- name: Commit generated transcript (if changed)
run: |
if [ -z "$(git status --porcelain)" ]; then
echo "No changed files. Skipping commit."
else
echo "Files changed."
git add .
git commit -m 'Add ${{ github.event.issue.title }} transcript'
echo "TRANSCRIPT_GENERATED=true" >> $GITHUB_ENV
fi
- name: Create Pull Request
if: env.TRANSCRIPT_GENERATED == 'true'
uses: peter-evans/create-pull-request@v3
with:
commit-message: Add ${{ github.event.issue.title }} transcript
title: Add ${{ github.event.issue.title }} transcript
branch: generate-meeting-transcript
branch-suffix: timestamp
author: ESLint Bot <eslint[bot]@users.noreply.github.com>
committer: ESLint Bot <eslint[bot]@users.noreply.github.com>
body: |
Add ${{ github.event.issue.title }} transcript.
This PR is autogenerated by the "Generate Transcript" GitHub Action.
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}