fix: gitlab licence service docs and example (#8083)
* fix: fix gitlab licence service docs and example * Update services/gitlab/gitlab-license.service.js Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com> Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
This commit is contained in:
@@ -15,15 +15,16 @@ const queryParamSchema = Joi.object({
|
||||
|
||||
const documentation = `
|
||||
<p>
|
||||
You may use your GitLab Project Id (e.g. 13083) or your Project Path (e.g. gitlab-org/gitlab-foss )
|
||||
You may use your GitLab Project Id (e.g. 278964) or your Project Path (e.g. gitlab-org/gitlab )
|
||||
</p>
|
||||
`
|
||||
|
||||
const customDocumentation = `
|
||||
<p>
|
||||
Note that only internet-accessible GitLab instances are supported, for example https://jihulab.com, https://gitlab.gnome.org, or https://gitlab.com/.
|
||||
You may use your GitLab Project Id (e.g. 13953) or your Project Path (e.g. gitlab-cn/gitlab ) in <a href="https://jihulab.com">https://jihulab.com</a>
|
||||
</p>
|
||||
`
|
||||
const commonProps = {
|
||||
namedParams: {
|
||||
project: 'gitlab-org/gitlab-foss',
|
||||
},
|
||||
documentation,
|
||||
}
|
||||
|
||||
export default class GitlabLicense extends GitLabBase {
|
||||
static category = 'license'
|
||||
@@ -37,22 +38,28 @@ export default class GitlabLicense extends GitLabBase {
|
||||
static examples = [
|
||||
{
|
||||
title: 'GitLab',
|
||||
...commonProps,
|
||||
namedParams: {
|
||||
project: 'gitlab-org/gitlab',
|
||||
},
|
||||
staticPreview: {
|
||||
label: 'license',
|
||||
message: 'MIT License',
|
||||
color: 'green',
|
||||
},
|
||||
documentation,
|
||||
},
|
||||
{
|
||||
title: 'GitLab (custom server)',
|
||||
...commonProps,
|
||||
namedParams: {
|
||||
project: 'gitlab-cn/gitlab',
|
||||
},
|
||||
queryParams: { gitlab_url: 'https://jihulab.com' },
|
||||
staticPreview: {
|
||||
label: 'license',
|
||||
message: 'MIT License',
|
||||
color: 'green',
|
||||
},
|
||||
documentation: customDocumentation,
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user