-
Notifications
You must be signed in to change notification settings - Fork 113
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
Made contributing.md file name check case insensitive in the cookbook source_url repo; Fixed github url regex; #2180
Made contributing.md file name check case insensitive in the cookbook source_url repo; Fixed github url regex; #2180
Conversation
…en in source url of cookbooks for reflecting correctly in cookbook quality metric Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>
Is it possible to write a test for this? Did we have existing unit tests for this functionality? |
@RajeshPaul38 It looks like there's a legit failure in the specs that will need to be resolved |
yes working on the fix for the unit tests. |
Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>
…atibility with spec Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>
@tas50 I've resolved the testcases. Have also fixed the regex to check for github URL match because there were multiple invalid github urls which were passing through the regex. Also have added a unit test to check for non github urls. You can review now. |
@@ -7,8 +7,7 @@ class SourceRepoWorker | |||
|
|||
def source_repo(cookbook_json) | |||
url = source_repo_url(cookbook_json) | |||
|
|||
url.match(%r{(?<=github.com\/)[\w-]+\/[\w-]+}).to_s | |||
url.match(%r{^(https?\://)?(github\.com/)(\w+/\w+)}).try(:[], 3).to_s |
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.
Can we include rubular permalink as a comment here? e.g. from https://rubular.com
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.
Great suggestion @dheerajd-msys . Thanks for the link. It's a great tool. Should I add the permalink in code?
LGTM overall !! |
Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Rajesh Paul rajesh.paul@progress.com
Description
made contributing.md file name check case insensitive in the repo given in source url of cookbooks for reflecting correctly in cookbook quality metric
Issues Resolved
#1837
Check List