-
-
Notifications
You must be signed in to change notification settings - Fork 403
33 lines (31 loc) · 1001 Bytes
/
contributing.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
# SPDX-FileCopyrightText: 2021 James Hilliard <[email protected]>
#
# SPDX-License-Identifier: MIT
on:
pull_request_target:
types:
- opened
jobs:
comment:
runs-on: ubuntu-latest
steps:
- name: Install pandoc
run: sudo apt-get install pandoc
- uses: actions/github-script@v5
with:
script: |
const contributing = await github.rest.repos.getContent({
owner: context.repo.owner,
repo: context.repo.repo,
path: 'doc/source/contributing.rst',
})
options = {
input: Buffer.from(contributing.data.content, 'base64')
}
mdout = await exec.getExecOutput('pandoc', ['-f', 'rst', '-t', 'gfm'], options)
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: mdout.stdout
})