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:
Caleb Cartwright
2020-09-08 17:13:31 -05:00
committed by GitHub
parent e9b3a0a921
commit 7e68644587
7 changed files with 250 additions and 336 deletions

View File

@@ -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({