Skip to content

Commit 17c4710

Browse files
committed
ci(update): handle "octokit-routes-release" dispatch event
1 parent 0288bad commit 17c4710

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/update.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Update
2+
on:
3+
repository_dispatch:
4+
types: [octokit-routes-release]
5+
6+
jobs:
7+
update_routes:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@master
11+
- uses: actions/setup-node@v1
12+
with:
13+
node-version: "12.x"
14+
15+
# try checking out routes-update branch. Ignore error if it does not exist
16+
- run: git checkout routes-update || true
17+
- run: npm ci
18+
- run: npm run update-endpoints
19+
env:
20+
VERSION: ${{ github.event.client_payload.version }}
21+
- name: Create Pull Request
22+
uses: gr2m/create-or-update-pull-request-action@v1.x
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
with:
26+
title: "🚧 GitHub REST API Endpoints changed"
27+
body: |
28+
See what changed at https://github.com/octokit/routes/releases/latest.
29+
30+
Make sure to update the commits so that the merge results in helpful release notes, see [Merging the Pull Request & releasing a new version](https://github.com/octokit/rest.js/blob/master/CONTRIBUTING.md#merging-the-pull-request--releasing-a-new-version).
31+
32+
In general
33+
34+
- Avoid breaking changes at all costs
35+
- If there are no typescript or code changes, use a `docs` prefix
36+
- If there are typescript changes but no code changes, use `fix(typescript)` prefix
37+
- If there are code changes, use `fix` if a problem was resolved, `feat` if new endpoints / parameters were added, and `feat(deprecation)` if a method was deprecated.
38+
branch: "routes-update"
39+
commit-message: "WIP octokit/routes updated"
40+
author: "Octokit Bot <33075676+octokitbot@users.noreply.github.com>"

0 commit comments

Comments
 (0)