Page MenuHomePhabricator

Add support for DiffusionRepositoryExtension so we can support go-get in diffusion.

Authored by mmodell on Sep 12 2017, 1:06 AM.


rPHAB853a5e1d409a: Add support for DiffusionRepositoryExtension so we can support go-get in…
Patch without arc
git checkout -b D775 && curl -L | git apply

This adds an extension mechanism which allows custom classes to hook the
request handling of diffusion repository requests. See D776 for implementation.

Test Plan

tested locally:

Diff Detail

rPHAB Phabricator
Lint OK
Unit Tests OK
Build Status
Buildable 2210
Build 3578: differential-jessieJenkins
Build 3577: arc lint + arc unit

Event Timeline

mmodell created this revision.Sep 12 2017, 1:06 AM
mmodell edited the summary of this revision. (Show Details)

It sort of looks like overkill to add this much code in order to do such a simple thing. I mean, an entire extension mechanism for this use-case?

Well, the reason I went with this design is because we already one other diffusion hack in place: CustomGithubDownloadLinks adds custom buttons in every repository's header that link to github's download-as-zip url. I attempted to make the the extension mechanism in this revision flexible enough to support the CustomGithubDownloadLinks use-case. In a future revision, the CustomGithubDownloadLinks code can be updated to use this extension mechanism.

In conclusion, this apparent over-engineering will, I believe, ultimately result in a cleaner / less hacked-up fork of phabricator.

dduvall accepted this revision.Sep 12 2017, 3:51 PM
This revision is now accepted and ready to land.Sep 12 2017, 3:51 PM
mmodell closed this revision.Sep 12 2017, 8:30 PM