Skip to content

Commit

Permalink
Chore: automate generation of meeting transcripts (#186)
Browse files Browse the repository at this point in the history
* Chore: automate generation of meeting transcripts

* Add CI

* Whoops! Install deps

* Bug fix

* Improve error message

* Fix unhandled promise rejection warning

* use process.exitCode

* Update scripts/generate-transcript.js

Co-authored-by: Brandon Mills <btmills@users.noreply.github.com>

* Address review suggestions

Co-authored-by: Brandon Mills <btmills@users.noreply.github.com>
  • Loading branch information
kaicataldo and btmills authored Jul 3, 2020
1 parent a0d175d commit b233987
Show file tree
Hide file tree
Showing 8 changed files with 1,484 additions and 0 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!.eslintrc.js
18 changes: 18 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"use strict";

module.exports = {
root: true,
extends: [
"eslint"
],
parserOptions: {
ecmaVersion: 8
},
env: {
node: true,
es6: true
},
rules: {
"no-console": "off"
}
};
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
lint:
name: Lint Files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 12
- name: Install dependencies
run: npm install
- name: Lint Files
run: npm run lint
38 changes: 38 additions & 0 deletions .github/workflows/generate-transcript.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
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@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 12
- 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'
git push "https://$GH_TOKEN@github.com/eslint/tsc-meetings.git" master
fi
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
Loading

0 comments on commit b233987

Please sign in to comment.