From 4963eba3e5bd5fa4c33c41e77ccfd1b2a64bbbdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Boutemy?= Date: Tue, 3 Dec 2024 21:46:58 +0900 Subject: [PATCH] first updates based on feedback --- .../reproducible-central.service.js | 9 ++++----- .../reproducible-central.tester.js | 16 ++++++++-------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/services/reproducible-central/reproducible-central.service.js b/services/reproducible-central/reproducible-central.service.js index f1bb1560007f6..f13dbdee09171 100644 --- a/services/reproducible-central/reproducible-central.service.js +++ b/services/reproducible-central/reproducible-central.service.js @@ -10,14 +10,14 @@ export default class ReproducibleCentral extends BaseJsonService { static category = 'dependencies' static route = { - base: 'reproducible-central/a', + base: 'reproducible-central/artifact', pattern: ':groupId/:artifactId/:version', } static openApi = { '/reproducible-central/a/{groupId}/{artifactId}/{version}': { get: { - summary: 'Reproducible Central', + summary: 'Reproducible Central Artifact', parameters: pathParams( { name: 'groupId', @@ -37,8 +37,7 @@ export default class ReproducibleCentral extends BaseJsonService { } static defaultBadgeData = { - label: 'Reproducible Builds', - labelColor: '1e5b96', + label: 'reproducible builds', } static render({ message, color }) { @@ -68,7 +67,7 @@ export default class ReproducibleCentral extends BaseJsonService { async handle({ groupId, artifactId, version }) { if (version.endsWith('-SNAPSHOT')) { - return this.constructor.render({ message: 'SNAPSHOT', color: 'grey' }) + return this.constructor.render({ message: 'SNAPSHOT, not evaluated', color: 'grey' }) } try { diff --git a/services/reproducible-central/reproducible-central.tester.js b/services/reproducible-central/reproducible-central.tester.js index fcb8c05bed437..a16b38d377e28 100644 --- a/services/reproducible-central/reproducible-central.tester.js +++ b/services/reproducible-central/reproducible-central.tester.js @@ -4,7 +4,7 @@ export const t = await createServiceTester() t.create('reproducible gav') .get('/org.apache.maven/maven-core/3.9.9') .expectBadge({ - label: 'Reproducible Builds', + label: 'reproducible builds', message: '47/47', color: 'green', }) @@ -12,7 +12,7 @@ t.create('reproducible gav') t.create('mostly reproducible gav') .get('/org.apache.maven/maven-core/3.8.5') .expectBadge({ - label: 'Reproducible Builds', + label: 'reproducible builds', message: '43/47', color: 'yellow', }) @@ -20,7 +20,7 @@ t.create('mostly reproducible gav') t.create('mostly non-reproducible gav') .get('/org.apache.maven/maven-core/3.6.3') .expectBadge({ - label: 'Reproducible Builds', + label: 'reproducible builds', message: '2/32', color: 'red', }) @@ -28,7 +28,7 @@ t.create('mostly non-reproducible gav') t.create('non-rebuildable gav') .get('/org.apache.maven/maven-core/4.0.0-alpha-2') .expectBadge({ - label: 'Reproducible Builds', + label: 'reproducible builds', message: 'X', color: 'red', }) @@ -36,19 +36,19 @@ t.create('non-rebuildable gav') t.create('unknown v for known ga') .get('/org.apache.maven/maven-core/3.9.9.1') .expectBadge({ - label: 'Reproducible Builds', + label: 'reproducible builds', message: '3.9.9.1', color: 'grey', }) t.create('unknown ga').get('/org.apache.maven/any/3.9.9').expectBadge({ - label: 'Reproducible Builds', + label: 'reproducible builds', message: 'unknown ga', color: 'orange', }) t.create('SNAPSHOT').get('/any/any/anything-SNAPSHOT').expectBadge({ - label: 'Reproducible Builds', - message: 'SNAPSHOT', + label: 'reproducible builds', + message: 'SNAPSHOT, not evaluated', color: 'grey', })