• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

badges / shields / 19223758698

09 Nov 2025 08:58PM UTC coverage: 97.971% (-0.09%) from 98.059%
19223758698

push

github

web-flow
Increase [NpmDownloads] cache (#11488)

5915 of 6188 branches covered (95.59%)

2 of 2 new or added lines in 1 file covered. (100.0%)

58 existing lines in 9 files now uncovered.

49779 of 50810 relevant lines covered (97.97%)

132.87 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

98.31
/services/sourceforge/sourceforge-last-commit.service.js
1
import Joi from 'joi'
3✔
2
import { BaseJsonService, pathParams } from '../index.js'
3✔
3
import { renderDateBadge } from '../date.js'
3✔
4

3✔
5
const schema = Joi.object({
3✔
6
  commits: Joi.array()
3✔
7
    .items(
3✔
8
      Joi.object({
3✔
9
        committed_date: Joi.string().required(),
3✔
10
      }).required(),
3✔
11
    )
3✔
12
    .required(),
3✔
13
}).required()
3✔
14

3✔
15
export default class SourceforgeLastCommit extends BaseJsonService {
3✔
16
  static category = 'activity'
3✔
17

3✔
18
  static route = {
3✔
19
    base: 'sourceforge/last-commit',
3✔
20
    pattern: ':project/:repo',
3✔
21
  }
3✔
22

3✔
23
  static openApi = {
3✔
24
    '/sourceforge/last-commit/{project}/{repo}': {
3✔
25
      get: {
3✔
26
        summary: 'SourceForge Last Commit',
3✔
27
        parameters: pathParams(
3✔
28
          {
3✔
29
            name: 'project',
3✔
30
            example: 'guitarix',
3✔
31
          },
3✔
32
          {
3✔
33
            name: 'repo',
3✔
34
            example: 'git',
3✔
35
            description:
3✔
36
              'The repository name, usually `git` but might be different.',
3✔
37
          },
3✔
38
        ),
3✔
39
      },
3✔
40
    },
3✔
41
  }
3✔
42

3✔
43
  static defaultBadgeData = { label: 'last commit' }
3✔
44

3✔
45
  async fetch({ project, repo }) {
3✔
46
    return this._requestJson({
4✔
47
      url: `https://sourceforge.net/rest/p/${project}/${repo}/commits`,
4✔
48
      schema,
4✔
49
      httpErrors: {
4✔
50
        404: 'project or repo not found',
4✔
51
      },
4✔
52
    })
4✔
53
  }
4✔
54

3✔
55
  async handle({ project, repo }) {
3✔
56
    const body = await this.fetch({ project, repo })
4✔
UNCOV
57
    return renderDateBadge(body.commits[0].committed_date)
×
58
  }
4✔
59
}
3✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc