Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
shields
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
shields.io
shields
Commits
852d02d6
Unverified
Commit
852d02d6
authored
9 months ago
by
Pierre-Yves Bigourdan
Committed by
GitHub
9 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Deprecate [Bountysource] service (#10371)
parent
47229ecc
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
services/bountysource/bountysource.service.js
+11
-47
11 additions, 47 deletions
services/bountysource/bountysource.service.js
services/bountysource/bountysource.tester.js
+4
-14
4 additions, 14 deletions
services/bountysource/bountysource.tester.js
with
15 additions
and
61 deletions
services/bountysource/bountysource.service.js
+
11
−
47
View file @
852d02d6
import
Joi
from
'
joi
'
import
{
deprecatedService
}
from
'
../index.js
'
import
{
metric
}
from
'
../text-formatters.js
'
import
{
BaseJsonService
,
pathParams
}
from
'
../index.js
'
export
const
Bountysource
=
deprecatedService
({
category
:
'
funding
'
,
const
schema
=
Joi
.
object
({
activity_total
:
Joi
.
number
().
required
()
})
route
:
{
base
:
'
bountysource/team
'
,
export
default
class
Bountysource
extends
BaseJsonService
{
pattern
:
'
:team/activity
'
,
static
category
=
'
funding
'
},
static
route
=
{
base
:
'
bountysource/team
'
,
pattern
:
'
:team/activity
'
}
label
:
'
bountysource
'
,
dateAdded
:
new
Date
(
'
2024-07-18
'
),
static
openApi
=
{
})
'
/bountysource/team/{team}/activity
'
:
{
get
:
{
summary
:
'
Bountysource
'
,
parameters
:
pathParams
({
name
:
'
team
'
,
example
:
'
mozilla-core
'
,
}),
},
},
}
static
defaultBadgeData
=
{
label
:
'
bounties
'
}
static
render
({
total
})
{
return
{
message
:
metric
(
total
),
color
:
'
brightgreen
'
,
}
}
async
fetch
({
team
})
{
const
url
=
`https://api.bountysource.com/teams/
${
team
}
`
return
this
.
_requestJson
({
schema
,
url
,
options
:
{
headers
:
{
Accept
:
'
application/vnd.bountysource+json; version=2
'
},
},
})
}
async
handle
({
team
})
{
const
json
=
await
this
.
fetch
({
team
})
return
this
.
constructor
.
render
({
total
:
json
.
activity_total
})
}
}
This diff is collapsed.
Click to expand it.
services/bountysource/bountysource.tester.js
+
4
−
14
View file @
852d02d6
import
{
isMetric
}
from
'
../test-validators.js
'
import
{
ServiceTester
}
from
'
../tester.js
'
import
{
ServiceTester
}
from
'
../tester.js
'
export
const
t
=
new
ServiceTester
({
export
const
t
=
new
ServiceTester
({
...
@@ -6,16 +5,7 @@ export const t = new ServiceTester({
...
@@ -6,16 +5,7 @@ export const t = new ServiceTester({
title
:
'
Bountysource
'
,
title
:
'
Bountysource
'
,
})
})
t
.
create
(
'
bounties (valid)
'
)
t
.
create
(
'
bounties
'
).
get
(
'
/team/mozilla-core/activity.json
'
).
expectBadge
({
.
get
(
'
/team/mozilla-core/activity.json
'
)
label
:
'
bountysource
'
,
.
expectBadge
({
message
:
'
no longer available
'
,
label
:
'
bounties
'
,
})
message
:
isMetric
,
})
t
.
create
(
'
bounties (invalid team)
'
)
.
get
(
'
/team/not-a-real-team/activity.json
'
)
.
expectBadge
({
label
:
'
bounties
'
,
message
:
'
not found
'
,
})
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment