-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
filter license when undefined to fix error in /discussions/1255 #1256
Conversation
d559111
to
cb214ac
Compare
Can you run |
346e3d5
to
2915364
Compare
I removed the failing test since I now see one already exists for multi lines. I thought it was missing so I was adding to get better coverage but it is not needed. |
All of the tests for utils.getRepoLicense are commented out. Was/Is there something with them? |
Hmm, no idea. May be an api limit thingy. Do they work if we uncomment them? |
…ons/1255, add unite tests for undefined license and multiple licenses and update git ignore to add line for IntelliJ module files - Signed-off-by: Cory Fitzpatrick [email protected] Signed-off-by: Cory Fitzpatrick <[email protected]>
6f74c71
to
4d6c577
Compare
I enabled the tests for this method and debugged the code a bit. This can be undefined but ,when it is the tests still pass so from my perspective this works as intended but I do not have all that much context to what all this means. If all my checks pass I think this is as far as I would like to go with this PR if that ok? |
… Signed-off-by: Cory Fitzpatrick [email protected] Signed-off-by: Cory Fitzpatrick <[email protected]>
4d6c577
to
d3b5ce9
Compare
…[email protected] Signed-off-by: Cory Fitzpatrick <[email protected]>
d3b5ce9
to
8a6adb9
Compare
if (!licenseContent.name && !licenseContent.id) { | ||
licenseContent.name = "CUSTOM"; | ||
license | ||
.filter((l) => l !== undefined) |
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.
Aside from formatting this was my only real change in this file
… Fitzpatrick [email protected] Signed-off-by: Cory Fitzpatrick <[email protected]>
8a6adb9
to
3106d9d
Compare
Signed-off-by: Cory Fitzpatrick <[email protected]>
Signed-off-by: Cory Fitzpatrick <[email protected]>
…[email protected] Signed-off-by: Cory Fitzpatrick <[email protected]>
…[email protected] Signed-off-by: Cory Fitzpatrick <[email protected]>
3106d9d
to
42b3324
Compare
@@ -2398,6 +2406,11 @@ test("get licenses", () => { | |||
expression: "GPL-3.0-only WITH Classpath-exception-2.0", | |||
}, | |||
]); | |||
|
|||
licenses = getLicenses({ |
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.
This is the test for my code change. The rest of the changes are me uncommenting some other tests and fixing them so they pass.
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.
Thank you!
filter license when undefined to fix error in /discussions/1255, add unit tests for undefined license and multiple licenses and update git ignore to add line for IntelliJ module files