• 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

87.1
/services/sourceforge/sourceforge-commit-count.service.js
1
import Joi from 'joi'
3✔
2
import { BaseJsonService, pathParams } from '../index.js'
3✔
3
import { metric } from '../text-formatters.js'
3✔
4

3✔
5
const schema = Joi.object({
3✔
6
  commit_count: Joi.number().required(),
3✔
7
}).required()
3✔
8

3✔
9
export default class SourceforgeCommitCount extends BaseJsonService {
3✔
10
  static category = 'activity'
3✔
11

3✔
12
  static route = {
3✔
13
    base: 'sourceforge/commit-count',
3✔
14
    pattern: ':project/:repo',
3✔
15
  }
3✔
16

3✔
17
  static openApi = {
3✔
18
    '/sourceforge/commit-count/{project}/{repo}': {
3✔
19
      get: {
3✔
20
        summary: 'SourceForge Commit Count',
3✔
21
        parameters: pathParams(
3✔
22
          {
3✔
23
            name: 'project',
3✔
24
            example: 'guitarix',
3✔
25
          },
3✔
26
          {
3✔
27
            name: 'repo',
3✔
28
            example: 'git',
3✔
29
            description:
3✔
30
              'The repository name, usually `git` but might be different.',
3✔
31
          },
3✔
32
        ),
3✔
33
      },
3✔
34
    },
3✔
35
  }
3✔
36

3✔
37
  static defaultBadgeData = { label: 'commit count' }
3✔
38

3✔
39
  static render({ commitCount }) {
3✔
UNCOV
40
    return {
×
UNCOV
41
      message: metric(commitCount),
×
UNCOV
42
      color: 'blue',
×
UNCOV
43
    }
×
UNCOV
44
  }
×
45

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

3✔
56
  async handle({ project, repo }) {
3✔
57
    const body = await this.fetch({ project, repo })
4✔
UNCOV
58
    return this.constructor.render({
×
UNCOV
59
      commitCount: body.commit_count,
×
UNCOV
60
    })
×
61
  }
4✔
62
}
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