diff options
Diffstat (limited to 'app/assets/javascripts/releases/stores/modules/edit_new/getters.js')
-rw-r--r-- | app/assets/javascripts/releases/stores/modules/edit_new/getters.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/app/assets/javascripts/releases/stores/modules/edit_new/getters.js b/app/assets/javascripts/releases/stores/modules/edit_new/getters.js index 0ca5eb9931a..62d6bd42d51 100644 --- a/app/assets/javascripts/releases/stores/modules/edit_new/getters.js +++ b/app/assets/javascripts/releases/stores/modules/edit_new/getters.js @@ -4,14 +4,6 @@ import { hasContent } from '~/lib/utils/text_utility'; import { getDuplicateItemsFromArray } from '~/lib/utils/array_utility'; /** - * @returns {Boolean} `true` if the app is editing an existing release. - * `false` if the app is creating a new release. - */ -export const isExistingRelease = (state) => { - return Boolean(state.tagName); -}; - -/** * @param {Object} link The link to test * @returns {Boolean} `true` if the release link is empty, i.e. it has * empty (or whitespace-only) values for both `url` and `name`. @@ -138,6 +130,7 @@ export const releaseUpdateMutatationVariables = (state, getters) => { projectPath: state.projectPath, tagName: state.release.tagName, name, + releasedAt: state.release.releasedAt, description: state.includeTagNotes ? getters.formattedReleaseNotes : state.release.description, @@ -163,6 +156,13 @@ export const releaseCreateMutatationVariables = (state, getters) => { }; }; +export const releaseDeleteMutationVariables = (state) => ({ + input: { + projectPath: state.projectPath, + tagName: state.release.tagName, + }, +}); + export const formattedReleaseNotes = ({ includeTagNotes, release: { description }, tagNotes }) => includeTagNotes && tagNotes ? `${description}\n\n### ${s__('Releases|Tag message')}\n\n${tagNotes}\n` |