Skip to content

ci: Don't create a 'false' deployment on non-master builds - #958

Merged
BYK merged 2 commits into
masterfrom
fix/no-false-deployment-env
Nov 3, 2026
Merged

BYK merged 2 commits into
masterfrom
fix/no-false-deployment-env

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

PRs show a weird green false entry under "Deployments".

The build job in build.yml and release-build.yml sets:

environment: ${{ github.ref == 'refs/heads/master' && 'production' }}

Off master this evaluates to boolean false, which GitHub coerces to an environment literally named "false". The repo now has a false environment (auto-created, no protection rules), and every PR build records a deployment to it. Recent deployments to it come from release/3.8.0 and several bot PR branches.

This change adds || '' so non-master builds run with no environment at all. On master it still resolves to production, so behavior there doesn't change.

Follow-up for a repo admin: delete the leftover false environment in Settings → Environments. That also removes its deployment history from existing PRs.

via @BYK.

--

View Session in Sentry

The build job's environment expression `github.ref == 'refs/heads/master' && 'production'`
evaluates to boolean false off master, which GitHub coerces to an environment
literally named "false". Every PR build then records a "false" deployment.
Fall back to an empty string so non-master builds run without an environment.

Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
@BYK
BYK merged commit 5d844cb into master Nov 3, 2026
21 checks passed
@BYK
BYK deleted the fix/no-false-deployment-env branch November 3, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant