Review (beta)
NOTE: Since the Review feature is currently in beta, we're not aiming to migrate any data created previous to the official (non-beta) release to make changes to the feature easier for our development team.
The Widgetbook Cloud Review feature (currently in beta) allows teams to review added, changed or removed components.
The Review feature closely relates to reviews known from Pull-Requests.
For each Pull-Request, our new widgetbook
CLI analyzes the changes to your Widgetbook and creates a review.
Members of a frontend-team now can review each changed use-case in isolation and add comments for other team members.
Once all changes from the review are accepted, a developer closes the Pull-Request and the review's status gets updated to merged
.
For this to work, a webhook to our services is required.
Requirements#
To use Widgetbook Cloud Review your setup has to meet the following requirements:
- Use
widgetbook_generator
package in versionv3.0.0-beta.10
(no special configuration required). - Use
widgetbook
package in versionv3.0.0-beta.11
(no special configuration required). - Use the
widgetbook
in versionv3.0.0-beta.22
CLI from the widgetbook_cli package. For instructions see Hosting. - Setup a GitHub webhook
Setup Webhook (GitHub)#
A GitHub Webhook allows Widgetbook Cloud to receive information about changes within your repository.
Widgetbook Cloud can automatically set the state of a Review to closed
or merged
when a corresponding Pull-Request is closed
or merged
.
For this to work, you need to configure a webhook.
See Setting up a webhook for instructions on how to do this.
Requirements#
You need to meet the following requirements to setup a webhook to Widgetbook Cloud:
- Webhook Secret
- Repository Name
- Payload URL
Obtaining the Webhook Secret#
- Navigate to your project overview in Widgetbook Cloud, then the settings page.
- Click the
Get secret
button within the webhook card. - Enter your full repository name in the text field. It is important for the repository name to be in the format
user-name/repository-name
. - Click on
I understand
and the secret will be copied into your clipboard.
Setting up the webhook#
- Go to https://github.com/user-name/repository-name/settings/hooks. Make sure to replace
user-name
andrepository-name
with your appropriate values. - Click
Add webhook
- Paste
https://api.widgetbook.io/v1/webhooks/github
into thePayload URL
field. - Set
Content type
toapplication/json
- Paste your Widgetbook Cloud webhook secret into the
Secret
field.- Note that you will update the webhook secret every time you obtain a new webhook secret from your Widgetbook Cloud project settings as the old webhook secret will be deleted.
- Select when to trigger the webhook:
- Select
Send me everything
or - Select
Let me select individual events
and enablePull requests
andPushes
. You can disable all other options.
- Select
- Enable the
Active
checkbox