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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
shields.io
shields
Commits
4da9e7d5
Unverified
Commit
4da9e7d5
authored
2 years ago
by
chris48s
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fall back to classifiers if license text is really long (#8690)
parent
affae9c5
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
services/pypi/pypi-helpers.js
+1
-1
1 addition, 1 deletion
services/pypi/pypi-helpers.js
services/pypi/pypi-helpers.spec.js
+7
-0
7 additions, 0 deletions
services/pypi/pypi-helpers.spec.js
with
8 additions
and
1 deletion
services/pypi/pypi-helpers.js
+
1
−
1
View file @
4da9e7d5
...
@@ -50,7 +50,7 @@ function getLicenses(packageData) {
...
@@ -50,7 +50,7 @@ function getLicenses(packageData) {
const
{
const
{
info
:
{
license
},
info
:
{
license
},
}
=
packageData
}
=
packageData
if
(
license
)
{
if
(
license
&&
license
.
length
<
40
)
{
return
[
license
]
return
[
license
]
}
else
{
}
else
{
const
parenthesizedAcronymRegex
=
/
\(([^
)
]
+
)\)
/
const
parenthesizedAcronymRegex
=
/
\(([^
)
]
+
)\)
/
...
...
This diff is collapsed.
Click to expand it.
services/pypi/pypi-helpers.spec.js
+
7
−
0
View file @
4da9e7d5
...
@@ -116,6 +116,13 @@ describe('PyPI helpers', function () {
...
@@ -116,6 +116,13 @@ describe('PyPI helpers', function () {
classifiers
:
[
'
License :: OSI Approved :: MIT License
'
],
classifiers
:
[
'
License :: OSI Approved :: MIT License
'
],
},
},
}),
}),
given
({
info
:
{
license
:
'
this text is really really really really really really long
'
,
classifiers
:
[
'
License :: OSI Approved :: MIT License
'
],
},
}),
given
({
given
({
info
:
{
info
:
{
license
:
''
,
license
:
''
,
...
...
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