From 1585d157c163c53dc39cc6e30db87bf9f574b45a Mon Sep 17 00:00:00 2001 From: Pierre-Yves Bigourdan <10694593+PyvesB@users.noreply.github.com> Date: Sat, 13 Jul 2024 20:57:54 +0200 Subject: [PATCH] Cleanup unused bits and pieces (#10349) --- services/docker/docker-version.service.js | 2 +- services/github/github-deployments.service.js | 2 +- services/github/github-milestone-detail.service.js | 4 ++-- services/github/github-milestone.service.js | 4 ++-- services/netlify/netlify.service.js | 6 +++--- services/obs/obs-build-status.js | 2 +- services/obs/obs.service.js | 5 ++--- services/wordpress/wordpress-last-update.service.js | 2 +- 8 files changed, 13 insertions(+), 14 deletions(-) diff --git a/services/docker/docker-version.service.js b/services/docker/docker-version.service.js index 9e8cef35a8..7fef8557fd 100644 --- a/services/docker/docker-version.service.js +++ b/services/docker/docker-version.service.js @@ -175,7 +175,7 @@ export default class DockerVersion extends BaseJsonService { }) } - const { version } = await this.transform({ + const { version } = this.transform({ tag, sort, data, diff --git a/services/github/github-deployments.service.js b/services/github/github-deployments.service.js index 920b8aebb0..57c0dffca9 100644 --- a/services/github/github-deployments.service.js +++ b/services/github/github-deployments.service.js @@ -130,7 +130,7 @@ export default class GithubDeployments extends GithubAuthV4Service { return { state } } - async handle({ user, repo, environment }, queryParams) { + async handle({ user, repo, environment }) { const json = await this.fetch({ user, repo, environment }) const { state } = this.transform({ data: json.data }) return this.constructor.render({ state }) diff --git a/services/github/github-milestone-detail.service.js b/services/github/github-milestone-detail.service.js index 98be914dad..c0c6b1f924 100644 --- a/services/github/github-milestone-detail.service.js +++ b/services/github/github-milestone-detail.service.js @@ -49,7 +49,7 @@ export default class GithubMilestoneDetail extends GithubAuthV3Service { static defaultBadgeData = { label: 'milestones', color: 'informational' } - static render({ user, repo, variant, number, milestone }) { + static render({ variant, milestone }) { let milestoneMetric let color let label = '' @@ -102,6 +102,6 @@ export default class GithubMilestoneDetail extends GithubAuthV3Service { async handle({ user, repo, variant, number }) { const milestone = await this.fetch({ user, repo, number }) - return this.constructor.render({ user, repo, variant, number, milestone }) + return this.constructor.render({ variant, milestone }) } } diff --git a/services/github/github-milestone.service.js b/services/github/github-milestone.service.js index 458071dcf0..f7874ecbd1 100644 --- a/services/github/github-milestone.service.js +++ b/services/github/github-milestone.service.js @@ -48,7 +48,7 @@ export default class GithubMilestone extends GithubAuthV3Service { color: 'informational', } - static render({ user, repo, variant, milestones }) { + static render({ variant, milestones }) { const milestoneLength = milestones.length let color let qualifier = '' @@ -84,6 +84,6 @@ export default class GithubMilestone extends GithubAuthV3Service { async handle({ user, repo, variant }) { const milestones = await this.fetch({ user, repo, variant }) - return this.constructor.render({ user, repo, variant, milestones }) + return this.constructor.render({ variant, milestones }) } } diff --git a/services/netlify/netlify.service.js b/services/netlify/netlify.service.js index 39a077db64..dd8ae105b2 100644 --- a/services/netlify/netlify.service.js +++ b/services/netlify/netlify.service.js @@ -49,7 +49,7 @@ export default class Netlify extends BaseSvgScrapingService { return result } - async fetch({ projectId, branch }) { + async fetch({ projectId }) { const url = `https://api.netlify.com/api/v1/badges/${projectId}/deploy-status` const { buffer } = await this._request({ url, @@ -61,8 +61,8 @@ export default class Netlify extends BaseSvgScrapingService { return { message: 'unknown' } } - async handle({ projectId, branch }) { - const { message: status } = await this.fetch({ projectId, branch }) + async handle({ projectId }) { + const { message: status } = await this.fetch({ projectId }) return this.constructor.render({ status }) } } diff --git a/services/obs/obs-build-status.js b/services/obs/obs-build-status.js index 834177c064..c26da4279c 100644 --- a/services/obs/obs-build-status.js +++ b/services/obs/obs-build-status.js @@ -19,7 +19,7 @@ const isBuildStatus = Joi.alternatives().try( Joi.equal(...Object.keys(localStatuses)), ) -function renderBuildStatusBadge({ repository, status }) { +function renderBuildStatusBadge({ status }) { const color = localStatuses[status] if (color) { return { diff --git a/services/obs/obs.service.js b/services/obs/obs.service.js index 11111f2783..d22d63d250 100644 --- a/services/obs/obs.service.js +++ b/services/obs/obs.service.js @@ -45,8 +45,8 @@ export default class ObsService extends BaseXmlService { static defaultBadgeData = { label: 'build' } - static render({ repository, status }) { - return renderBuildStatusBadge({ repository, status }) + static render({ status }) { + return renderBuildStatusBadge({ status }) } async fetch({ instance, project, packageName, repository, arch }) { @@ -73,7 +73,6 @@ export default class ObsService extends BaseXmlService { arch, }) return this.constructor.render({ - repository, status: resp.status['@_code'], }) } diff --git a/services/wordpress/wordpress-last-update.service.js b/services/wordpress/wordpress-last-update.service.js index 3e0d96d856..793a778831 100644 --- a/services/wordpress/wordpress-last-update.service.js +++ b/services/wordpress/wordpress-last-update.service.js @@ -74,7 +74,7 @@ function LastUpdateForType(extensionType) { slug, }) - const newDate = await this.transform(lastUpdated) + const newDate = this.transform(lastUpdated) return this.constructor.render({ lastUpdated: newDate, -- GitLab