Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12251131
D3735.id9660.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D3735.id9660.diff
View Options
diff --git a/phabricator/analyze-repositories/Makefile b/phabricator/analyze-repositories/Makefile
--- a/phabricator/analyze-repositories/Makefile
+++ b/phabricator/analyze-repositories/Makefile
@@ -4,7 +4,7 @@
all: analyze
repositories.json:
- curl https://${INSTANCE}/api/diffusion.repository.search -d api.token=${TOKEN} -d queryKey=all -d attachments[uris]=1 > repositories.json
+ curl https://${INSTANCE}/api/diffusion.repository.search -d api.token=${TOKEN} -d queryKey=all -d attachments[uris]=1 -d attachments[projects]=1 > repositories.json
analyze: repositories.json
./coherence-check-repositories.py repositories.json
diff --git a/phabricator/analyze-repositories/coherence-check-repositories.py b/phabricator/analyze-repositories/coherence-check-repositories.py
--- a/phabricator/analyze-repositories/coherence-check-repositories.py
+++ b/phabricator/analyze-repositories/coherence-check-repositories.py
@@ -63,6 +63,11 @@
)
)
+ if not has_projects(repository):
+ issues.append(
+ ("projects-missing", f"No project attached. Add here: {settings_url}")
+ )
+
if issues:
app["issues"][repository["fields"]["callsign"]] = issues
@@ -91,6 +96,10 @@
return "https" + url[pos_start:pos_end]
+def has_projects(repository):
+ return len(repository["attachments"]["projects"]["projectPHIDs"]) > 0
+
+
def contains_github_url(repository):
for uri in repository["attachments"]["uris"]["uris"]:
if "github.com/" in uri["fields"]["uri"]["normalized"]:
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Oct 13, 01:38 (14 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3069855
Default Alt Text
D3735.id9660.diff (1 KB)
Attached To
Mode
D3735: Ensure repositories have attached projects
Attached
Detach File
Event Timeline
Log In to Comment