-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (37 loc) · 1.56 KB
/
auto-create-pr-scalardl.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
# This workflow auto-creates PRs for ScalarDL docs that come from the centralized private docs repository where we update our docs.
name: ✨ Auto-create pull request - ScalarDL docs
on:
push:
branches:
- scalardl/**
jobs:
create-pull-request:
runs-on: ubuntu-latest
steps:
- name: Create pull request
uses: actions/github-script@v7
with:
script: |
const { repo, owner } = context.repo;
const result = await github.rest.pulls.create({
title: 'AUTO: Docs repo sync - ScalarDL',
owner,
repo,
head: '${{ github.ref_name }}',
base: 'main',
body: [
'This is an automated pull request (PR) to sync changes to ScalarDL docs in the centralized private docs repo to this public docs site repo.',
'',
'Before merging this PR, confirm the following:',
'',
'- [ ] I have updated the side navigation to include new docs or remove deleted docs (if necessary).',
'- [ ] I have confirmed that this PR can be merged without waiting (if necessary).',
' - An example of when a PR must wait to be merged is when the docs are part of a pending release of a new product version.'
].join('\n')
});
github.rest.issues.addLabels({
owner,
repo,
issue_number: result.data.number,
labels: ['documentation', 'scalardl', 'triage']
});