Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscribe to octokit/routes repository_dispatch event for updates #46

Open
swinton opened this issue Dec 15, 2019 · 0 comments
Open

Subscribe to octokit/routes repository_dispatch event for updates #46

swinton opened this issue Dec 15, 2019 · 0 comments
Assignees

Comments

@swinton
Copy link
Owner

swinton commented Dec 15, 2019

Use a workflow similar to this one to regenerate Insomnia routes whenever a new octokit/routes release becomes available:

name: Update REST API endpoint methods
on:
  repository_dispatch:
    types: [octokit-routes-release]

jobs:
  update_routes:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - uses: actions/setup-node@v1
        with:
          node-version: "12.x"
        # try checking out routes-update branch. Ignore error if it does not exist
      - run: git checkout routes-update || true
      - run: npm ci
      - run: npm run update-endpoints
        env:
          VERSION: ${{ github.event.client_payload.version }}
      - name: Create Pull Request
        uses: gr2m/create-or-update-pull-request-action@v1.x
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          title: "🚧 GitHub REST Endpoints changed"
          body: |
            See what changed at https://github.com/octokit/routes/releases/latest.

            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).

            In general

            - Avoid breaking changes at all costs
            - If there are no typescript or code changes, use a `docs` prefix
            - If there are typescript changes but no code changes, use `fix(typescript)` prefix
            - 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.
          branch: "routes-update"
          commit-message: "WIP octokit/routes updated"
          author: "Octokit Bot <33075676+octokitbot@users.noreply.github.com>"

Inspiration.

@swinton swinton self-assigned this Dec 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant