Stop calling variables "which"; affects [chocolatey codeclimate conda crates debug gem github mozillaobservatory nuget powershellgallery pub resharper vaadindirectory] (#3495)
* which --> variant * which --> alias * which --> format * improve param names in codeclimate * improve param names in github-issue-detail * update github-issue-detail unit tests
This commit is contained in:
@@ -13,7 +13,7 @@ module.exports = class GithubRelease extends GithubAuthService {
|
||||
static get route() {
|
||||
return {
|
||||
base: 'github',
|
||||
pattern: ':which(release|release-pre)/:user/:repo',
|
||||
pattern: ':variant(release|release-pre)/:user/:repo',
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ module.exports = class GithubRelease extends GithubAuthService {
|
||||
{
|
||||
title: 'GitHub release',
|
||||
namedParams: {
|
||||
which: 'release',
|
||||
variant: 'release',
|
||||
user: 'qubyte',
|
||||
repo: 'rubidium',
|
||||
},
|
||||
@@ -46,14 +46,14 @@ module.exports = class GithubRelease extends GithubAuthService {
|
||||
}
|
||||
}
|
||||
|
||||
async handle({ which, user, repo }) {
|
||||
async handle({ variant, user, repo }) {
|
||||
const {
|
||||
tag_name: version,
|
||||
prerelease: isPrerelease,
|
||||
} = await fetchLatestRelease(this, {
|
||||
user,
|
||||
repo,
|
||||
includePre: which === 'release-pre',
|
||||
includePre: variant === 'release-pre',
|
||||
})
|
||||
return this.constructor.render({ version, isPrerelease })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user