-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#453 addressing issue #454
base: main
Are you sure you want to change the base?
Changes from 4 commits
5caa67c
9ac184b
a3e40d9
8b0b659
b4a5988
becb263
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -313,7 +313,7 @@ def submit_license(request): | |||||||||||||||||||||||||||||||||
if 'urlType' in request.POST: | ||||||||||||||||||||||||||||||||||
# This is present only when executing submit license via tests | ||||||||||||||||||||||||||||||||||
urlType = request.POST["urlType"] | ||||||||||||||||||||||||||||||||||
statusCode = createIssue(licenseAuthorName, licenseName, licenseIdentifier, licenseComments, licenseSourceUrls, licenseHeader, licenseOsi, licenseRequestUrl, token, urlType) | ||||||||||||||||||||||||||||||||||
statusCode,issueId = createIssue(licenseAuthorName, licenseName, licenseIdentifier, licenseComments, licenseSourceUrls, licenseHeader, licenseOsi, licenseRequestUrl, token, urlType) | ||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. E501: line too long (193 > 79 characters) ❗❗ 3 similar findings have been found in this PR 🔎 Expand here to view all instances of this finding
Visit the Lift Web Console to find more details in your report. ℹ️ Expand to see all @sonatype-lift commandsYou can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Note: When talking to LiftBot, you need to refresh the page to see its response. Help us improve LIFT! (Sonatype LiftBot external survey) Was this a good recommendation for you? Answering this survey will not impact your Lift settings. [ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ] There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. E1120: No value for argument 'urlType' in function call ℹ️ Expand to see all @sonatype-lift commandsYou can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Note: When talking to LiftBot, you need to refresh the page to see its response. Help us improve LIFT! (Sonatype LiftBot external survey) Was this a good recommendation for you? Answering this survey will not impact your Lift settings. [ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ] There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. reportGeneralTypeIssues: Argument missing for parameter "urlType" ℹ️ Expand to see all @sonatype-lift commandsYou can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Note: When talking to LiftBot, you need to refresh the page to see its response. Help us improve LIFT! (Sonatype LiftBot external survey) Was this a good recommendation for you? Answering this survey will not impact your Lift settings. [ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ] |
||||||||||||||||||||||||||||||||||
if str(statusCode) == '201': | ||||||||||||||||||||||||||||||||||
result = "Success! The license request has been successfully submitted." | ||||||||||||||||||||||||||||||||||
query.result = result | ||||||||||||||||||||||||||||||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,23 @@ | ||||||||||||||||||
# Generated by Django 3.2.18 on 2023-03-29 19:04 | ||||||||||||||||||
|
||||||||||||||||||
from django.db import migrations, models | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. E0401: Unable to import 'django.db' ℹ️ Expand to see all @sonatype-lift commandsYou can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Note: When talking to LiftBot, you need to refresh the page to see its response. Help us improve LIFT! (Sonatype LiftBot external survey) Was this a good recommendation for you? Answering this survey will not impact your Lift settings. [ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ] There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. reportMissingImports: Import "django.db" could not be resolved ℹ️ Expand to see all @sonatype-lift commandsYou can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Note: When talking to LiftBot, you need to refresh the page to see its response. Help us improve LIFT! (Sonatype LiftBot external survey) Was this a good recommendation for you? Answering this survey will not impact your Lift settings. [ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ] |
||||||||||||||||||
|
||||||||||||||||||
|
||||||||||||||||||
class Migration(migrations.Migration): | ||||||||||||||||||
|
||||||||||||||||||
dependencies = [ | ||||||||||||||||||
('app', '0001_initial'), | ||||||||||||||||||
] | ||||||||||||||||||
|
||||||||||||||||||
operations = [ | ||||||||||||||||||
migrations.AddField( | ||||||||||||||||||
model_name='licensenamespace', | ||||||||||||||||||
name='issueId', | ||||||||||||||||||
field=models.TextField(default=''), | ||||||||||||||||||
), | ||||||||||||||||||
migrations.AddField( | ||||||||||||||||||
model_name='licenserequest', | ||||||||||||||||||
name='issueId', | ||||||||||||||||||
field=models.TextField(default=''), | ||||||||||||||||||
), | ||||||||||||||||||
] |
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,17 @@ | ||||||||||||||||||
# Generated by Django 3.2.18 on 2023-04-01 08:58 | ||||||||||||||||||
|
||||||||||||||||||
from django.db import migrations | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. E0401: Unable to import 'django.db' ℹ️ Expand to see all @sonatype-lift commandsYou can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Note: When talking to LiftBot, you need to refresh the page to see its response. Help us improve LIFT! (Sonatype LiftBot external survey) Was this a good recommendation for you? Answering this survey will not impact your Lift settings. [ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ] There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. reportMissingImports: Import "django.db" could not be resolved ℹ️ Expand to see all @sonatype-lift commandsYou can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Note: When talking to LiftBot, you need to refresh the page to see its response. Help us improve LIFT! (Sonatype LiftBot external survey) Was this a good recommendation for you? Answering this survey will not impact your Lift settings. [ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ] |
||||||||||||||||||
|
||||||||||||||||||
|
||||||||||||||||||
class Migration(migrations.Migration): | ||||||||||||||||||
|
||||||||||||||||||
dependencies = [ | ||||||||||||||||||
('app', '0002_auto_20230330_0034'), | ||||||||||||||||||
] | ||||||||||||||||||
|
||||||||||||||||||
operations = [ | ||||||||||||||||||
migrations.RemoveField( | ||||||||||||||||||
model_name='licensenamespace', | ||||||||||||||||||
name='issueId', | ||||||||||||||||||
), | ||||||||||||||||||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -162,8 +162,9 @@ def submitNewLicense(request): | |
licenseId = licenseRequest.id | ||
serverUrl = request.build_absolute_uri('/') | ||
licenseRequestUrl = os.path.join(serverUrl, reverse('license-requests')[1:], str(licenseId)) | ||
statusCode = utils.createIssue(licenseAuthorName, licenseName, licenseIdentifier, licenseComments, licenseSourceUrls, licenseHeader, licenseOsi, licenseExamples, licenseRequestUrl, token, urlType) | ||
|
||
statusCode, issueId = utils.createIssue(licenseAuthorName, licenseName, licenseIdentifier, licenseComments, licenseSourceUrls, licenseHeader, licenseOsi, licenseExamples, licenseRequestUrl, token, urlType) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rtgdk done |
||
licenseRequest.issueId = issueId | ||
licenseRequest.save() | ||
# If the license text matches with either rejected or yet not approved license then return 409 Conflict | ||
else: | ||
statusCode = 409 | ||
|
@@ -346,6 +347,7 @@ def licenseInformation(request, licenseId): | |
|
||
licenseInformation['licenseAuthorName'] = licenseRequest.licenseAuthorName | ||
licenseInformation['archive'] = licenseRequest.archive | ||
licenseInformation['issueId'] = licenseRequest.issueId | ||
xmlString = licenseRequest.xml | ||
data = utils.parseXmlString(xmlString) | ||
licenseInformation['osiApproved'] = data['osiApproved'] | ||
|
@@ -986,7 +988,7 @@ def promoteNamespaceRequests(request, license_id=None): | |
if 'urlType' in request.POST: | ||
# This is present only when executing submit license via tests | ||
urlType = request.POST["urlType"] | ||
statusCode = utils.createIssue(licenseAuthorName, licenseName, licenseIdentifier, licenseComments, licenseSourceUrls, licenseHeader, licenseOsi, licenseExamples, licenseRequestUrl, token, urlType) | ||
statusCode,issueId = utils.createIssue(licenseAuthorName, licenseName, licenseIdentifier, licenseComments, licenseSourceUrls, licenseHeader, licenseOsi, licenseExamples, licenseRequestUrl, token, urlType) | ||
return_tuple = (statusCode, licenseRequest) | ||
statusCode = return_tuple[0] | ||
if statusCode == 201: | ||
|
@@ -1161,7 +1163,7 @@ def issue(request): | |
licenseRequestId = licenseRequest.id | ||
serverUrl = request.build_absolute_uri('/') | ||
licenseRequestUrl = os.path.join(serverUrl, reverse('license-requests')[1:], str(licenseRequestId)) | ||
statusCode = utils.createIssue(licenseAuthorName, licenseName, licenseIdentifier, licenseComments, licenseSourceUrls, licenseHeader, licenseOsi, licenseExamples, licenseRequestUrl, token, urlType, matchId, diffUrl, msg) | ||
statusCode,issueId = utils.createIssue(licenseAuthorName, licenseName, licenseIdentifier, licenseComments, licenseSourceUrls, licenseHeader, licenseOsi, licenseExamples, licenseRequestUrl, token, urlType, matchId, diffUrl, msg) | ||
data['statusCode'] = str(statusCode) | ||
return JsonResponse(data) | ||
except UserSocialAuth.DoesNotExist: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E231: missing whitespace after ','
❗❗ 2 similar findings have been found in this PR
🔎 Expand here to view all instances of this finding
Visit the Lift Web Console to find more details in your report.
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
@sonatype-lift ignore
@sonatype-lift ignoreall
@sonatype-lift exclude <file|issue|path|tool>
file|issue|path|tool
from Lift findings by updating your config.toml fileNote: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Help us improve LIFT! (Sonatype LiftBot external survey)
Was this a good recommendation for you? Answering this survey will not impact your Lift settings.
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]