mirror of
https://github.com/badges/shields.git
synced 2026-11-21 16:06:35 +03:00
* change deprecated badge messages to 'retired badge' - reduce confusion over deprecated badge source (badge, shields, endpoint service, user's service) - reduce length of message to reduce traffic update all deprecated services and base class code in a follow-up commit after discussion. see https://github.com/badges/shields/pull/11792#issuecomment-4229267483 * update default deprecation message to 'retired badge' * update deprecated badge messages to 'retired badge' in tests
35 lines
1.2 KiB
JavaScript
35 lines
1.2 KiB
JavaScript
import { ServiceTester } from '../tester.js'
|
|
|
|
export const t = new ServiceTester({
|
|
id: 'GithubWorkflowStatus',
|
|
title: 'Github Workflow Status',
|
|
pathPrefix: '/github/workflow/status',
|
|
})
|
|
|
|
const expectedDeprecatedResponse = {
|
|
label: 'githubworkflowstatus',
|
|
message: 'https://github.com/badges/shields/issues/8671',
|
|
link: ['https://github.com/badges/shields/issues/8671'],
|
|
color: 'red',
|
|
}
|
|
|
|
t.create('retired badge (previously nonexistent repo)')
|
|
.get('/badges/shields-fakeness/fake.json')
|
|
.expectBadge(expectedDeprecatedResponse)
|
|
|
|
t.create('retired badge (previously nonexistent workflow)')
|
|
.get('/actions/toolkit/not-a-real-workflow.json')
|
|
.expectBadge(expectedDeprecatedResponse)
|
|
|
|
t.create('retired badge (previously valid workflow)')
|
|
.get('/actions/toolkit/toolkit-unit-tests.json')
|
|
.expectBadge(expectedDeprecatedResponse)
|
|
|
|
t.create('retired badge (previously valid workflow - branch)')
|
|
.get('/actions/toolkit/toolkit-unit-tests/master.json')
|
|
.expectBadge(expectedDeprecatedResponse)
|
|
|
|
t.create('retired badge (previously valid workflow - event)')
|
|
.get('/actions/toolkit/toolkit-unit-tests.json?event=push')
|
|
.expectBadge(expectedDeprecatedResponse)
|