This chapter illustrates some hidden features that you can use to enhance your workflow when using FeaturePeek. Some of these tips apply to when you're opening up a PR in GitHub, while others apply as options within the FeaturePeek UI itself.
Set the entry path when you create the pull request
Your environment's entry path is the route that loads initially when your reviewers click on the link in GitHub, Slack, or your team's dashboard in FeaturePeek.
If you only made changes to your front-end's
/about page, then you can set your entry path to be
/about so that your reviewers will land there automatically instead of having to navigate on their own.
To set the entry path at the same time as you create the pull request, simply include
@featurepeek /entry/path in the description of your pull request body, where
/entry/path is the route to your desired path.
For more details, read our changelog post about this feature.
Use the peek.run URL shortener
If you have a URL like
https://dashboard.featurepeek.com/peek/a1b2c3, you can shorten this to
peek.run/a1b2c3 — it'll redirect to the full dashboard URL.
The document fragment gets preserved too:
peek.run/a1b2c3#/about will take you to the environment's
Only spin up environments for certain branches
Your team may not desire a feature environment (and subsequently, pull request comments) for every single pull request. Pull requests with trivial changes — or changes that don't affect your front-end at all — aren't good candidates for FeaturePeek environments.
You can specify a branch pattern to only spin up environments for PRs whose branches match a given regular expression.
In your peek.yml file, include a key called
branchPattern. Any PR branch that doesn't match this value will not spin up an environment automatically.
For example, if you only want FeaturePeek to spin up environments for branches that start with
peek/, you'd add the following to your peek.yml file:
If you only want FeaturePeek to spin up environments for branches that end with
-peek, you'd add the following to your peek.yml file:
Of course, you may push a PR to GitHub that doesn't match this pattern, only to realize later that you do in fact want an environment for it. In that case, you should spin up the FeaturePeek environment manually.
Point reviewers to where features land
You may send someone a FeaturePeek link, but merge in your pull request before they get a change to view the link.
By setting a destination URL on your project, your reviewers will be presented with an option of viewing the integrated feature on your own staging environment rather than a feature environment.
To set the destination URL, click the Settings icon next to your project name in your FeaturePeek dashboard. You should set this value be the staging server, or in other words, where you verify features are OK after you merge them in.
Spin up environments manually
If you specified a branch pattern for your project, not all of your environments will spin up automatically.
You may push a branch that doesn't match your project's branch pattern, only to realize later that you do in fact want an environment for it. In that case, edit the body of your PR description to include
@featurepeek -- this will create an environment and post the link on this pull request.