* add gitea service based on gitlab * update gitea to use mocks * add gitea release test * move tests to use public repo on codeberg and fixes * add pagination, update tests to live, set gitea_url as required * add auth test (wip) * fix base auth test * fix required optionalUrl, remove default, assume semver from firstpage * update example to use stable repository
20 lines
397 B
JavaScript
20 lines
397 B
JavaScript
import { BaseJsonService } from '../index.js'
|
|
|
|
export default class GiteaBase extends BaseJsonService {
|
|
static auth = {
|
|
passKey: 'gitea_token',
|
|
serviceKey: 'gitea',
|
|
}
|
|
|
|
async fetch({ url, options, schema, httpErrors }) {
|
|
return this._requestJson(
|
|
this.authHelper.withBearerAuthHeader({
|
|
schema,
|
|
url,
|
|
options,
|
|
httpErrors,
|
|
}),
|
|
)
|
|
}
|
|
}
|