Page MenuHomePhabricator

Add staging URLs into `repository.create` endpoint
Closed, ResolvedPublic


Until T10337 ships, how feasible is it to add the staging URL configuration into repository.create?

We are using the staging areas, and want to write a script to automatically create URLs. This is the only field absent from repository.create that requires us to manually jump in and use it.


Event Timeline

This would be strictly obsoleted by T10337 and not help us build toward it, so we'd prefer not to pursue it in the upstream.

Generally, when we have a plan to do something "The Right Way", we're resistant to implementing a hack/stopgap in the meantime unless that hack mostly gets us closer to the proper fix. In this case, it would purely be a lateral move and bring us no closer to diffusion.edit.

Some possible pathways forward:

  • You can copy/paste repository.create to create repository.createpro or similar (which can be loaded as an extension, just drop it in src/extensions/), augment that, and then use that as a stopgap until diffusion.edit becomes available.
  • You can pay us consulting rates to copy/paste repository.create for you and add this stopgap to it. This is probably about 10 minutes of work. It won't come upstream and we won't maintain it.
  • You can wait for diffusion.edit.
  • You can pay us prioritization rates to pursue diffusion.edit as soon as possible. This particular feature is complicated and the pathway forward lies through T10366. I've estimated that alone at 40 hours of work elsewhere. This is probably only incrementally more, perhaps 48 hours of work.

You can also just update the JSON value in the details column in phabricator_repository.repository directly. This won't generate a proper transaction in the edit record, but will work correctly (that column is authoritative, and not cached by anything).

Oh, and as an unusual special case I'll upstream anything you want to do to PhabricatorRepositoryManagementEditWorkflow and we'll keep it not-broken until T10337, although I promise to break it after that. This workflow has special favor and exists outside the normal rules of usptreaming hacks.

avivey added a subscriber: avivey.Mar 30 2016, 11:43 PM

My hack for it is P1963: It's a script, not a conduit, but it's reasonably usable other then that.

oh, I might take you up about PhabricatorRepositoryManagementEditWorkflow then.

That's a useful script! Thanks for sharing, that will likely do everything we will need and I can run that.

Once T10337 ships, we won't need this at all I don't think so I'm fine with any future breakages :)

I ended up creating a custom extension.

This is good to close and eagerly await for diffusion.edit. I also am looking into paid prioritization based on our road map here, we'd love to start doing that for some items.

epriestley closed this task as Resolved.Mar 31 2016, 8:47 PM
epriestley claimed this task.

Sounds good. I added you to Community so you should have sweeping administrative powers now.

I'll definitely use my powers for evil. Thanks :)