convert some service classes to static props, run [archlinux aur azuredevops] (#5500)
* refactor(archlinux): convert to static props * refactor(aur): convert to static props * refactor(azuredevops): convert to static props * tests: fix AzDO Coverage service test Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
This commit is contained in:
@@ -9,34 +9,25 @@ const schema = Joi.object({
|
||||
}).required()
|
||||
|
||||
module.exports = class ArchLinux extends BaseJsonService {
|
||||
static get category() {
|
||||
return 'version'
|
||||
static category = 'version'
|
||||
static route = {
|
||||
base: 'archlinux/v',
|
||||
pattern: ':repository/:architecture/:packageName',
|
||||
}
|
||||
|
||||
static get route() {
|
||||
return {
|
||||
base: 'archlinux/v',
|
||||
pattern: ':repository/:architecture/:packageName',
|
||||
}
|
||||
}
|
||||
|
||||
static get examples() {
|
||||
return [
|
||||
{
|
||||
title: 'Arch Linux package',
|
||||
namedParams: {
|
||||
architecture: 'x86_64',
|
||||
repository: 'core',
|
||||
packageName: 'pacman',
|
||||
},
|
||||
staticPreview: renderVersionBadge({ version: '5.1.3' }),
|
||||
static examples = [
|
||||
{
|
||||
title: 'Arch Linux package',
|
||||
namedParams: {
|
||||
architecture: 'x86_64',
|
||||
repository: 'core',
|
||||
packageName: 'pacman',
|
||||
},
|
||||
]
|
||||
}
|
||||
staticPreview: renderVersionBadge({ version: '5.1.3' }),
|
||||
},
|
||||
]
|
||||
|
||||
static get defaultBadgeData() {
|
||||
return { label: 'arch linux' }
|
||||
}
|
||||
static defaultBadgeData = { label: 'arch linux' }
|
||||
|
||||
async handle({ repository, architecture, packageName }) {
|
||||
const data = await this._requestJson({
|
||||
|
||||
Reference in New Issue
Block a user