-
Notifications
You must be signed in to change notification settings - Fork 27
36 lines (34 loc) · 1.14 KB
/
create-Issue.yaml
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
name: Create Issue for Pull Request
on:
pull_request:
branches:
- main
paths:
- "docs/**/*.md"
- "docs/**/*.mdx"
jobs:
ja:
runs-on: ubuntu-latest
# Do not run translation on PRs from forks since they don't have access to the SIMPLEEN secret
if: ${{ !github.event.pull_request.head.repo.fork }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.sha }}
- uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Get Changed Files
id: files
run: |
echo "::set-output name=list::$(git diff --name-only ${{ github.event.before }} ${{ github.sha }})"
- uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const issue = await github.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: `${{ github.event.pull_request.title }} [ja]`,
body: `Changed Files:\n${{ github.event.pull_request.html_url }}/files \n cc: @MomentoBigFun @Yoshiitaka`
})