handle source repos with broken links to gradle files

https://github.com/kiwibrowser/src has a build.gradle that is a broken link:

$ ls -l build/com.google.ar.core.examples.java.helloar/third_party/android_sdk/public/extras/android/support/v4/src/build.gradle
lrwxrwxrwx 1 hans hans 92 Mai 11 17:29 build/com.google.ar.core.examples.java.helloar/third_party/android_sdk/public/extras/android/support/v4/src/build.gradle -> ../../../../../../../../../.cipd/pkgs/80/_current/extras/android/support/v4/src/build.gradle
parent 84163220
Pipeline #147121460 failed with stage
in 180 minutes
......@@ -264,12 +264,13 @@ for issue in rfp.issues.list(state='opened',order_by='updated_at',per_page=250):
if f.endswith('.gradle') or f.endswith('.gradle.kts'):
labels.add('gradle')
path = os.path.join(root, f)
with open(path, errors='surrogateescape') as fp:
data = fp.read()
for url in HTTP_GRADLE_PATTERN.findall(data):
print('Found plain HTTP URL for gradle repository:\n%s\n%s'
% (path, url))
insecure_repositories.add(url)
if os.path.exists(path):
with open(path, errors='surrogateescape') as fp:
data = fp.read()
for url in HTTP_GRADLE_PATTERN.findall(data):
print('Found plain HTTP URL for gradle repository:\n%s\n%s'
% (path, url))
insecure_repositories.add(url)
elif f.endswith('.java'):
labels.add('java')
elif f.endswith('.kt'):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment