Status badge for branch deploys

It would be nice if you could have status badges for branch deploys. For example, I am forced to use the same badge for my dev branch and my production main branch. This is not optimal, as then visitors will only see the production status

1 Like

hmm, interesting. I will pass this along. thanks!

PLEASE!!! Branch-based badges are NEEDED! Any update on this @perry?

Thanks for the ping @rvbn!

No updates; we don’t see this as a blocking use case in general so have not prioritized it very highly thus far. Could you explain your extreme need in more detail so we can update the existing feature request with the importance of this feature to you, so our Product team can consider it in light of that situation?

Thanks in advance for your help!

1 Like

Sure. We use a branch for staging our static builds (pulling from Wordpress and building in Gatsby) so that editorial team can preview changes prior to kicking off a production build. Having a build status for their eyes (prior to production) would be SUPER helpful.

1 Like

Hi, @rvbn. One workaround for this would be to create two sites. One would use the staging (or other) branch as the production branch as it would there have a badge which was specific to that branch. In other words, two sites and two different badges.

If the feature request changes we will let you know with a new update to this topic. If there are other question (including about the workaround above), please let us know.

Putting my voice in here to advocate for branch deploy status badge.

I use Sanity quite a bit for clients as a CMS - you can tie different deploys into Sanity with Netlify deploy buttons to make it easier for the team to trigger a deploy.

We usually setup a prod and dev frontend at a minimum. Often times we go through big structural shifts in the CMS, so having a dev deployment is great.

The problem that comes up is when a team hits the Dev netlify deploy button - it appears as if nothing is happening (b/c status is pulled from master).

The current workaround is just to explain to teams that yes, they did trigger a build, but no there is no visual confirmation that it happened.

This is a great workaround - but your going to essentially have to setup billing for both sites at this point, which is not enough of an update to justify having an updated deploy badge.

The branch deploys definitely falls under the ‘nice to have’ category.

What billing are you talking about, exactly, Edward? Doesn’t cost money to have multiple sites here :slight_smile:

1 Like

Yup :slight_smile:

I was tired - my mind did not compute that running a master / dev site build on two sites is no different than doing a master / dev branch build on one site (same amount of build minutes used).

I like the workaround @luke posted - will use this in the meantime!

One issue with this workaround: if your preview branch is a new website, then all updates to the preview branch trigger a new build. Ideally I’d like to set it up so that

1.) The status badge is for a build to the preview branch
2.) The preview branch does not build on push, and is only triggered by a webhook.

However, you can’t turn off builds for a website on push and allow web hooks to trigger builds on the production branch (which, in this workaround, for the ‘preview’ version of the website, needs to be the preview branch). The proposed workaround for this issue is to use branch you never update for your production branch and a branch-deploy for the webhook: which means we’re back to the same problem with the badge not showing the status of a branch deploy.

Just wanted to say I’m in the same position as @EdwardGoomba, using Sanity with two environments that the editors can deploy using the Netlify Deploy dashboard plugin, however both badges are for the production environment, so if they deploy production, both badges react, and if they deploy staging, none of them do.
Being able to add a branch parameter to the badge code would make our lives much better.

thanks for your feedback, @fvieira-moscadigital - i have added your thoughts to the issue we have filed for this. I don’t have an ETA when there might be a change on this, but if/when I do, I’ll be sure to update you all here. Thank you for your patience in the meantime!

This has now been shipped. You can append ?branch=branchname to the URL and it should work.