Files
shields/services/gitea/gitea-base.js
CanisHelix 8f1f787ceb [GITEA] add new gitea service (release/languages) (#9781)
* 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
2023-12-18 12:39:17 +00:00

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,
}),
)
}
}