Page MenuHomePhabricator

Allow editing hosting policies via command line
ClosedPublic

Authored by WikiChad on Oct 9 2015, 6:56 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 24, 10:46 PM
Unknown Object (File)
Fri, Apr 19, 3:44 PM
Unknown Object (File)
Fri, Apr 19, 11:24 AM
Unknown Object (File)
Thu, Apr 11, 7:39 AM
Unknown Object (File)
Sat, Apr 6, 11:34 PM
Unknown Object (File)
Sat, Mar 30, 12:41 AM
Unknown Object (File)
Fri, Mar 29, 9:44 PM
Unknown Object (File)
Mar 19 2024, 10:56 AM

Details

Reviewers
epriestley
Group Reviewers
Blessed Reviewers
Commits
Restricted Diffusion Commit
rPe80970eba036: Allow editing hosting policies via command line
Summary

Exposes the serve-over-http and serve-over-ssh options for a repository
to the bin/repository edit endpoint.

Test Plan

Ran bin/repository with the new options over several hundred repos

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

WikiChad retitled this revision from to Allow editing hosting policies via command line.
WikiChad updated this object.
WikiChad edited the test plan for this revision. (Show Details)
epriestley added a reviewer: epriestley.

Per IRC: fine with this generally, have a couple refinement/suggestions inline.

src/applications/repository/management/PhabricatorRepositoryManagementEditWorkflow.php
10–13

Can you put a "(This workflow will eventually be deprecated by Conduit.)" or similar note here?

Per IRC, I'd like to replace this with repository.edit or similar after T5955, but am fine with cluttering it up a bit in the meantime.

84–86

Maybe validate that these are supported values instead of total nonsense?

103

Weird indent?

This revision now requires changes to proceed.Oct 9 2015, 6:59 PM

For posterity:

twentyafterfour: epriestley: would upstream be interested in "Allow editing hosting policies via command line"  -> https://phabricator.wikimedia.org/P2176
twentyafterfour: I can submit a diff if you'd like it
epriestley: I think I'd rather wait for a proper `repository.edit` over Conduit after T5873, I don't want to put 50 sub-workflows on `bin/repository` for editing one thing each.
epriestley: That diff looks fine, though.
epriestley: The local path stuff is just me cheating and adding stuff we needed for Phacility.
epriestley: Because I am an evil corporation and abhor openness.
epriestley: oh wait
epriestley: haha
epriestley: I added `bin/repository move-paths` which is like a strictly better version of `bin/repository edit` since it only does local-path
epriestley: So my long term plan is to get rid of `bin/repository edit` and use Conduit instead.
epriestley: That said, since you're just adding flags, I'm OK with upstreaming that patch if:
epriestley: 1) Put some type checking on the values, so users can't set them to goofy nonsense?
epriestley: 2) Mark the workflow as "(Will eventually be deprecated by Conduit.)" or similar in the help text.
epriestley: Then you can dump as much junk into it as you want I guess and we can just clean it up once Conduit works better.
WikiChad edited edge metadata.
  • Mention ./bin/repo edit workflow as eventually deprecated by Conduit
epriestley edited edge metadata.

You should have commit access now -- point your origin at the repositories on this host to push (GitHub won't work), or you can use "Land Revision" in the UI.

src/applications/repository/management/PhabricatorRepositoryManagementEditWorkflow.php
103

Indent stil weird.

This revision is now accepted and ready to land.Nov 4 2015, 5:45 PM
WikiChad marked 2 inline comments as done.
WikiChad edited edge metadata.
  • Mention ./bin/repo edit workflow as eventually deprecated by Conduit
  • Fix indentation
  • Validate user values for repo hosting modes

Inline issues should all be fixed.

This revision was automatically updated to reflect the committed changes.