1
0
mirror of https://github.com/badges/shields.git synced 2025-11-03 15:13:18 +03:00

[sourceforge] add repo param to last commit service (#10935)

* [sourceforge] add repo param to last commit service

some sourceforge projects have multiple repositories, so we need to
specify the repository to use for the last commit service.

* [sourceforge] add redirect for old project param only URLs
This commit is contained in:
jNullj
2025-03-09 18:23:39 +02:00
committed by GitHub
parent dc43239bcb
commit 231a48fa87
4 changed files with 51 additions and 14 deletions

View File

@@ -3,9 +3,17 @@ import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('last commit')
.get('/guitarix.json')
.get('/guitarix/git.json')
.expectBadge({ label: 'last commit', message: isFormattedDate })
t.create('last commit (non default repo)')
.get('/opencamera/code.json')
.expectBadge({ label: 'last commit', message: isFormattedDate })
t.create('last commit (project not found)')
.get('/that-doesnt-exist.json')
.expectBadge({ label: 'last commit', message: 'project not found' })
.get('/that-doesnt-exist/fake.json')
.expectBadge({ label: 'last commit', message: 'project or repo not found' })
t.create('last commit (repo not found)')
.get('/guitarix/fake-repo.json')
.expectBadge({ label: 'last commit', message: 'project or repo not found' })