GitHub action to deploy your API documentation on Bump
MIT License
Bot releases are visible (Hide)
Published by paulRbr 4 months ago
diff
action is configured in your repository workflow file, we will now publish a comment if your API document file has changes without structural changes. We used to publish a comment only on structural changes, but we now also publish a comment on content-only change too (which includes a preview link to that updated document).The release also includes some dependencies upgrades.
Have fun documenting APIs β¨
Published by paulRbr 5 months ago
Published by paulRbr 8 months ago
This release includes two main improvements
ππ You can now deploy an entire directory of API documents to a Bump.sh hub. This was added in the CLI but was not yet possible with the GitHub action. For now the default filename-pattern is used ({slug}-api.[json|yaml]
so your API documents following this filename pattern will be deployed to your target hub)
To do so, you will need to use the hub:
input parameter of the GitHub action, and change the file:
input parameter to target a directory. Don't forget to remove an existing doc:
input parameter π.
Have fun documenting APIs β¨
Published by paulRbr about 1 year ago
This is a bugfix release which contains a fix to be able to send AsyncAPI 2.6.0 definition files. There was a bug in the JS dependency tree from the bump-cli
package which led to inconsistent node packages.
With this release the bug is gone! π
Have fun with AsyncAPI β¨
Published by paulRbr over 1 year ago
fail_on_breaking
input parameter useful for the diff
commandCheck our blog post announcement about our api diff
feature if you've never tried it
The diff
command can be used with a new input parameter fail_on_breaking
in order for the workflow to fail if the diff contains a breaking change. This is especially useful in a CI environment when diff is computed for each pull request.
jobs:
api-diff:
name: Check API diff on Bump
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Comment pull request with API diff
uses: bump-sh/github-action@v1
with:
doc: <BUMP_DOC_ID>
token: ${{secrets.BUMP_TOKEN}}
file: doc/api-documentation.yml
command: diff
# -------------
# NEW PARAMETER
# -------------
fail_on_breaking: true
# -------------
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
bump-cli
)Have fun designing APIs β¨
Published by paulRbr over 1 year ago
bump-cli
)public_url
from Diff responseHave fun designing APIs β¨
Published by paulRbr about 2 years ago
This is a tiny release to make sure the Bump GitHub action runs on top of node v16 and avoids displaying some warnings to our users.
Thanks @calexander3 for the feedback π
Published by paulRbr about 2 years ago
diff
command can now be called for different Api documentations on the same repositoryCheck our blog post announcement about our api diff
feature if you've never tried it
diff
command can now be used for as many existing Bump documentation as you wish, on the same repository. This means that if you have a git repository containing multiple Api specification file, each one attached to a dedicated documentation on Bump, you can define as many diff jobs in your workflow GitHub Action file as you wish. The important point is to provide the doc:
input (with the doc slug or id) to each github action invocation. cf #310Have fun designing APIs!
β¨
Published by paulRbr over 2 years ago
bump-cli
) to support new Bump branching deploymentsTwo main changes in this release
You can now specify a new input parameter branch
during deployments done with this GitHub action. This is particularly useful when you want to keep multiple history available of your API documentation. For more information you can check the CLI release note.
AsyncAPI recently released their 2.4 version last month. Check out their blog post announcement: https://www.asyncapi.com/blog/release-notes-2.4.0
With this new release of the Bump GitHub Action we partially support the latest changes of the AsyncAPI spec.
Have fun designing APIs β¨
Published by paulRbr over 2 years ago
bump-cli
) to support AsyncAPI 2.3Have fun designing APIs β¨
Published by paulRbr over 2 years ago
diff
command can now be called unauthenticatedCheck our blog post announcement about our api diff
feature if you've never tried it
The diff
command can now be used without the need of an account on Bump. If you want to compare two API contracts you can use our GitHub Action without any further actions. You will get your API changes commented directly into your pull requests! Here is an example configuration to be able to run API diffs on OpenAPI or AsyncAPI contracts on a public projectΒ :
name: Diff API documentation
on:
pull_request_target:
branches:
- main # β Change this to the name of your target main branch
jobs:
public-api-diff:
if: ${{ github.event_name == 'pull_request_target' }}
name: Check public API diff on Bump
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Comment pull request with API diff
uses: bump-sh/github-action@v1
with:
file: openapi.yaml # β Change this to the path of your API contract file
command: diff
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
With this workflow, any PRs opened on your repository will get an API diff update through a pull request comment. So public contributions won't need any specific access to your repository, nor any specific access to your Bump.sh account.
Have fun designing APIs!
β¨
Published by paulRbr almost 3 years ago
This release introduces a visual change in the diff comments sent to GitHub pull requests. If you don't use the diff
command yet, please check out our release annoucement.
Here is a before/after to show you the new display (before in red, after in green):
The diff comment will now be more detailed and displayed in a markdown format instead of a raw text. We hope it will make your API design reviews easier. If you have feedback on the resulting format, please contact us, either via an issue on this repository or by email.
β¨
Published by paulRbr almost 3 years ago
This release is mainly a bugfix around the diff
command.
The diff command will work without errors even for API contracts that make use of external References (with the $ref
keyword referencing multiple files).
Many thanks @davidgoldelocks for reporting the initial issue. π
(Check our blog post announcement talking about our new bump diff
- βAPI diffβ - feature if you missed our v1.0.0
release)
β¨
Published by paulRbr about 3 years ago
diff
feature of this Github-Action, the bot will automatically delete any existing Bump comment if the API definition file diff has changed to be empty.diff
feature of this Github-Action, empty diffs could lead to incorrect Bump diff summary comments. This has been fixed in the bump-cli
npm package used in this project.Published by paulRbr about 3 years ago
This new release mostly includes a bugfix on the automated diff feature on pull requests.
bump diff
action will now only compare the exact changes made in your pull request, by ignoring any merge commit (GitHub automatically runs any Github-Action on a merge commit between your PR and your target branch), and checking the last common ancestor between your target branch and your PR head branch. This is hopefully the last bugfix around diff management in our github-action. Sorry to those of you who have been (patiently) sharing their issues, and especially @gmourier from MeilisearchΒ πβ¨
bump-cli
to latest v2.2.5 in order to accept AsyncAPI files up to specification version 2.2
β¨
Published by paulRbr about 3 years ago
This new release mostly includes a bugfix on the automated diff feature on pull requests.
The automatic bump diff
(if used in your repository) action will now only compare the changes present in your pull requests instead of comparing with the latest deployed version of your documentation on bump.sh. This means the github bot comment will include a comprehensive, and consistent, summary of the API changes made in your pull request.
You might not have seen this bug if you use a single main
branch and merge PRs often. But if you had a βbufferingβ git branch (usually a staging branch for instance) you probably saw inconsistent API changelogs in some of the bot comments. This is now over and diff comparison will present only API changes made in your pull request ππ.
β¨
Published by paulRbr about 3 years ago
This new release mostly includes a small bugfix on the GitHub automated diff comments on PRs.
diff
of your API will now be more explicit in case of breaking changes (π¨).β¨
Published by paulRbr about 3 years ago
Check our blog post announcement talking about our new api diff
feature if you missed our v1.0.0
release
This new release mostly includes a small bugfix on the GitHub automated diff comments on PRs.
β¨
Published by paulRbr over 3 years ago
Check our blog post announcement talking about our new api diff
feature
@v1
is out πThis is the first stable v1 version of our Bump Github Action. It was crafted with love to integrate smoothly in your development workflow, whether you have API documentation needs or API changelog needs or both!
You can now use the bump-sh/github-action@v1
v1 tag inside your workflow yaml definition. This tag will follow the v1.x minor releases which we will update with only minor changes/bug fixes, no breaking changes expected. By doing so you won't have to follow every minor updates we do regularly and can be sure to always have the most up-to-date github-action code running in your Actions.
Our github-action now offers a new command: diff
input parameter, which can help you detect API changes before they land in production during your code review. This is done directly as a github-action[bot]
comment on your pull requests. Here is an example taken from the OpenAPI specification of the Gitlab API: https://github.com/bump-sh/gitlab-api-example/pull/1
It's a perfect new reviewer bot to help you detect API changes (and soon breaking changes π).
We have updated many node dependencies to use the latest available packages, re-wrote the way we import our bump-cli
package inside the github-action to have a better programmatic interaction. See this PR on the CLI side if you are interested.