Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: 2
updates:
# create PRs for out-of-range updates
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
versioning-strategy: "increase"
labels:
- "maintenance"

# Update actions with branch-based versioning
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
labels:
- "maintenance"
22 changes: 22 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Release
on:
push:
branches:
- main
- next
- beta
- "*.x" # maintenance releases

jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- run: npm ci
- run: npm run build
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.OCTOKITBOT_NPM_TOKEN }}
67 changes: 67 additions & 0 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Update
on:
repository_dispatch:
types: [github-openapi-release]

push:
branches:
- dependabot/npm_and_yarn/openapi-typescript-*

workflow_dispatch:

jobs:
update:
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch' || github.event.client_payload.action == 'published'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- run: npm ci
# do not update cache for dependabot update
- run: npm run download
if: github.event_name != 'push'
- run: npm run generate-types

# create/update pull request for dispatch event update
- name: Create Pull Request
if: github.event_name != 'push'
uses: gr2m/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.OCTOKITBOT_PAT }}
with:
title: "🚧 OpenAPI types changed"
body: |
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 changes, use `build: cache` as commit message
- If there are there are only updates, use `fix: ...`
- If there are any new additions, use `feat: ...`
- If there are breaking changes, keep the previous ones and deprecate them. Only if there is no other way, add `BREAKING CHANGE: ...` to the commit body (not subject!) to trigger a breaking change.
branch: "openapi-update"
commit-message: "WIP"
author: "Octokit Bot <[email protected]>"

# update pull request for dependabot update
- name: Create Pull Request
if: github.event_name == 'push'
uses: gr2m/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.OCTOKITBOT_PAT }}
with:
title: "🚧 OpenAPI types changed"
body: |
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 changes, use `build: cache` as commit message
- If there are there are only updates, use `fix: ...`
- If there are any new additions, use `feat: ...`
- If there are breaking changes, keep the previous ones and deprecate them. Only if there is no other way, add `BREAKING CHANGE: ...` to the commit body (not subject!) to trigger a breaking change.
branch: "${{ github.ref }}"
commit-message: "WIP"
author: "Octokit Bot <[email protected]>"
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Work in progress: [#1](https://github.com/gr2m/github-openapi-types/pull/1)

# github-openapi-types
# openapi-types.ts

> Generated TypeScript definitions based on GitHub's OpenAPI spec

Expand Down
Loading