Page MenuHomePhabricator

Add links on all Phabricator/Maniphest project pages to the corresponding canonical code repository location
Closed, ResolvedPublic

Description

It is easy to go from a Diffusion page to its corresponding project in Phabricator (tags are added on the right, see rECHU for instance. But the opposite is difficult; e.g. from MediaWiki-extensions-Checkuser there is no link back to rECHU.

A link should be added on project Workbooks to their source code in Diffusion.

This could be as simple as editing the project's description (like how I did it here) and adding a line with the link. I think it has to be done manually.

Event Timeline

greg triaged this task as Low priority.Aug 29 2016, 5:48 PM
greg subscribed.

Yes, that would be nice to do for all appropriate projects.

• Aklapper renamed this task from Links should be provided from a Phabricator project page to its source code page in Diffusion to Add links on all Phabricator/Maniphest project pages to the corresponding source code pages in Diffusion.Mar 11 2019, 1:51 PM
• Aklapper lowered the priority of this task from Low to Lowest.

For the record, I have been going around and adding such links whenever I run into a project in Phab that doesn't have a link to the corresponding Diffusion page. At this point, I think the best "solution", so to speak, is to make sure that whenever a new project is created on Phab, a checklist is followed (do we have one?) and linking the project to its Diffusion is an item on the checklist.

I don't think linking to Diffusion only should be done nowadays. Phabricator project pages now have an optional Source Repo field. In my opinion, that should link to either gitiles/Gerrit or Github or Diffusion (wherever the canonical source repository is located).

Coming back to this task, as I recognize a pattern of new technical contributors asking on tasks where the corresponding code repository is located.

  • As the task title explicitly mentions Diffusion: I do not think linking to Diffusion (or e.g. mirrored Github repos) makes sense in most cases: To avoid confusion where to actually place your merge request, links should be to the canonical code repository location (currently that means: sometimes Gerrit, sometimes Github, sometimes Diffusion).
  • I've documented to fill in the Source repo field on Phabricator project pages at https://www.mediawiki.org/w/index.php?title=Phabricator/Creating_and_renaming_projects&type=revision&diff=4397603&oldid=4340778 when creating new project tags in Phabricator.
  • FYI, I've started to (semi-automatically) add a code repo location link to some Phab project pages. Not trivial due to naming differences between Phab and code repo (CamelCase vs no_camel_case, Gerrit being case-sensitive), unclear canonical locations due to mirroring, sometimes unclear code repo locations at all.
• Aklapper renamed this task from Add links on all Phabricator/Maniphest project pages to the corresponding source code pages in Diffusion to Add links on all Phabricator/Maniphest project pages to the corresponding canonical code repository location.Feb 9 2021, 2:42 PM

I have no idea if that's "good enough" and I'd prefer clearer criteria when this ticket can be closed, however:

693 description pages of non-archived Phab projects now have a "Source Repo" URL set on their description page.[1] (Two weeks ago it was 24.)

That also means 453 active blue top-level (not: subproject or milestone) project tags in Phabricator do not have a "Source Repo" defined. Note that not all of them can have a Source Repo URL defined; quite often it's non-applicable (not one single codebase etc) or it just requires a lot of digging because docs aren't great.

Side effect results of this exploration: A bunch of bug reports about inconsistencies.


[1] SELECT COUNT(p.id) FROM phabricator_project.project_customfieldstorage cf INNER JOIN phabricator_project.project p WHERE cf.fieldIndex = "hlSfIwr1hZCq" AND cf.objectPHID = p.phid AND p.status != 100;
[2] SELECT CONCAT("https://phabricator.wikimedia.org/project/profile/", p.id) AS url, p.name FROM phabricator_project.project p WHERE p.status != 100 AND p.parentProjectPHID IS NULL AND p.color = "blue" AND p.phid NOT IN (SELECT cf1.objectPHID FROM phabricator_project.project_customfieldstorage cf1 WHERE cf1.fieldIndex = "hlSfIwr1hZCq");

• Aklapper claimed this task.

Shrug :) good enough I guess