-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (42 loc) · 1.68 KB
/
issues-to-csv.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
name: Convert Issues to CSV data
on:
issues:
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issues
types:
- reopened
- labeled
jobs:
update_library:
runs-on: ubuntu-latest
name: Append to the evilometer CSV
# only continue if issue has "new-score" label
if: contains( github.event.issue.labels.*.name, 'new-score')
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: stefanbuck/github-issue-parser@v3
id: issue-parser
with:
template-path: .github/ISSUE_TEMPLATE/log-evilometer-score.yml
- uses: cjlm/[email protected]
with:
path: src/_data/evilometer-data.csv
columns: no,chris,james,michael,guest,man
'no': ${{ steps.issue-parser.outputs.issueparser_episode }}
'chris': ${{ steps.issue-parser.outputs.issueparser_chris }}
'james': ${{ steps.issue-parser.outputs.issueparser_james }}
'michael': ${{ steps.issue-parser.outputs.issueparser_michael }}
'guest': ${{ steps.issue-parser.outputs.issueparser_guest }}
'man': ${{ steps.issue-parser.outputs.issueparser_man }}
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add *
git commit -m "Added evilometer scores for episode ${{ steps.issue-parser.outputs.issueparser_episode }}"
git push
- name: Close issue
uses: peter-evans/close-issue@v1
with:
issue-number: '${{ github.event.issue.number }}'
comment: 'Thank you! Your data file has been added!'