Default newReleasePath inject in releases empty state
What does this MR do and why?
Guest users see two Vue warnings in the browser console when viewing the releases empty state. The warnings occur because newReleasePath is injected without a default value. The Ruby helper only adds newReleasePath to the page data when the user can create releases. For guest users, this key is absent. The warnings do not affect visible behavior because GlEmptyState hides the primary button when the link is missing.
The warnings are Injection "newReleasePath" not found and Property or method "newReleasePath" is not defined.
Fix: Use object-form inject with default: null for documentationPath, illustrationPath, and newReleasePath. This matches the default of the matching GlEmptyState props, so behavior is unchanged. The button text is now passed unconditionally. GlEmptyState hides the button when the link is null. No template branch is needed. A spec case covers a user who cannot create a release.
Changes made:
app/assets/javascripts/releases/components/releases_empty_state.vuespec/frontend/releases/components/releases_empty_state_spec.js
How to set up and validate locally
-
Sign out or use an incognito window.
-
Open a project (any project, you do not need to create one).
-
Go to Deploy > Releases.
-
The empty state should show without a create button.

-
Check the browser console shows no
[Vue warn]line for this warning.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
- I have evaluated the MR acceptance checklist for this MR.
References
- Addresses one entry of #628901 (browser console error catalogue, section C: Vue warnings)
- Warnings surfaced by !255207 (closed) (feature specs fail on console errors)
- Sibling fixes from the same section: !255388 (merged), !255390 (merged), !255391 (closed), !255392 (merged), !255393 (closed), !255394 (merged), !255395 (merged), !255396 (merged), !255397 (merged), !255398 (merged)
