-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Remove invalid mail addresses when updating the license header #6926
Conversation
The problem is, that for some users we only have a pseudonym. We should check if removing them from the license header is even possible. cc @schiessle |
Ah yes, that could be a problem. We also could just remove the |
Reminder to myself to kick @schiessle about this |
I think that's a good compromise. I would not remove anyone or any information which might be technically not correct (e.g. email) but still useful for a human who might be able to spot the typo easily and fix it. So I think removing the |
6a01e72
to
745bd15
Compare
Ok, fixed the commit to just remove the brackets. Please review @MorrisJobke @schiessle @rullzer |
Codecov Report
@@ Coverage Diff @@
## master #6926 +/- ##
============================================
+ Coverage 50.73% 50.73% +<.01%
Complexity 24413 24413
============================================
Files 1579 1579
Lines 93294 93294
Branches 1359 1359
============================================
+ Hits 47332 47333 +1
+ Misses 45962 45961 -1
|
I would like to see #7083 in before that and will have a look at this afterwards to see the actual difference. |
745bd15
to
42378b9
Compare
Rebased and testing the output now :) |
build/license.php
Outdated
private function fixInvalidEmail($author) { | ||
preg_match('/<(.*)>/', $author, $mailMatch); | ||
if (count($mailMatch) === 2 && !filter_var($mailMatch[1], FILTER_VALIDATE_EMAIL)) { | ||
$author = str_replace(' <'.$mailMatch[1].'>', $mailMatch[1], $author); |
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.
Please remove the leading space. Otherwise it will look like this:
diff --git a/lib/private/Setup.php b/lib/private/Setup.php
index 8e718b0232..af3d7a3c0c 100644
--- a/lib/private/Setup.php
+++ b/lib/private/Setup.php
@@ -2,7 +2,7 @@
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
- * @author Administrator <Administrator@WINDOWS-2012>
+ * @author AdministratorAdministrator@WINDOWS-2012
* @author Arthur Schiwon <[email protected]>
* @author Bart Visscher <[email protected]>
* @author Bernhard Posselt <[email protected]>
And maybe also add quotes around it to more easily recognise what was the email.
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.
🙈 Fixed.
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.
What about the quotes around the "email"?
42378b9
to
d12a0b2
Compare
build/license.php
Outdated
private function fixInvalidEmail($author) { | ||
preg_match('/<(.*)>/', $author, $mailMatch); | ||
if (count($mailMatch) === 2 && !filter_var($mailMatch[1], FILTER_VALIDATE_EMAIL)) { | ||
$author = str_replace('<'.$mailMatch[1].'>', $mailMatch[1], $author); |
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.
Could we have quotes around the previous email? Something like str_replace('<'.$mailMatch[1].'>', '"'.$mailMatch[1].'"', $author);
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.
Sorry, I somehow missed that. Fixed as well.
…header Signed-off-by: Julius Härtl <[email protected]>
d12a0b2
to
7006b73
Compare
Signed-off-by: Morris Jobke <[email protected]>
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.
Tested, works, and updated headers are committed to this branch as well 👍
Follow up of #6864
This will make sure we only have valid email addresses in the license header, so parsing of the phpdoc block will succeed.
Should i also run the script and commit the changes or is that done only during the release build process?