MCPcopy Create free account
hub / github.com/github/docs / cleanPreviewTitle

Function cleanPreviewTitle

src/graphql/scripts/build-changelog.js:158–167  ·  view source on GitHub ↗
(title)

Source from the content-addressed store, hash-verified

156 * @return {string}
157 */
158export function cleanPreviewTitle(title) {
159 if (title === 'UpdateRefsPreview') {
160 title = 'Update refs preview'
161 } else if (title === 'MergeInfoPreview') {
162 title = 'Merge info preview'
163 } else if (!title.endsWith('preview')) {
164 title = title + ' preview'
165 }
166 return title
167}
168
169/**
170 * Turn the given title into an HTML-ready anchor.

Callers 2

createChangelogEntryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected