1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 17:02:41 +01:00
phorge-phorge/webroot/rsrc/js/application
epriestley 3386920971 Add Herald support for blocking ref changes
Summary: Ref T4195. Allows users to write Herald rules which block ref changes. For example, you can write a rule like `alincoln can not create branches`, or `no one can push to the branch "frozen"`.

Test Plan:
This covers a lot of ground. I created and pushed a bunch of rules, then looked at transcripts, in general. Here are some bits in detail:

Here's a hook-based reject message:

  >>> orbital ~/repos/POEMS $ git push
  Counting objects: 5, done.
  Delta compression using up to 8 threads.
  Compressing objects: 100% (3/3), done.
  Writing objects: 100% (3/3), 274 bytes, done.
  Total 3 (delta 2), reused 0 (delta 0)
  remote: +---------------------------------------------------------------+
  remote: |      * * * PUSH REJECTED BY EVIL DRAGON BUREAUCRATS * * *     |
  remote: +---------------------------------------------------------------+
  remote:             \
  remote:              \                    ^    /^
  remote:               \                  / \  // \
  remote:                \   |\___/|      /   \//  .\
  remote:                 \  /V  V  \__  /    //  | \ \           *----*
  remote:                   /     /  \/_/    //   |  \  \          \   |
  remote:                   @___@`    \/_   //    |   \   \         \/\ \
  remote:                  0/0/|       \/_ //     |    \    \         \  \
  remote:              0/0/0/0/|        \///      |     \     \       |  |
  remote:           0/0/0/0/0/_|_ /   (  //       |      \     _\     |  /
  remote:        0/0/0/0/0/0/`/,_ _ _/  ) ; -.    |    _ _\.-~       /   /
  remote:                    ,-}        _      *-.|.-~-.           .~    ~
  remote:   \     \__/        `/\      /                 ~-. _ .-~      /
  remote:    \____(Oo)           *.   }            {                   /
  remote:    (    (--)          .----~-.\        \-`                 .~
  remote:    //__\\  \ DENIED!  ///.----..<        \             _ -~
  remote:   //    \\               ///-._ _ _ _ _ _ _{^ - - - - ~
  remote:
  remote:
  remote: This commit was rejected by Herald pre-commit rule H24.
  remote: Rule: No Branches Called Blarp
  remote: Reason: "blarp" is a bad branch name
  remote:
  To ssh://dweller@localhost/diffusion/POEMS/
   ! [remote rejected] blarp -> blarp (pre-receive hook declined)
  error: failed to push some refs to 'ssh://dweller@localhost/diffusion/POEMS/'

Here's a transcript, showing that all the field values populate sensibly:

{F90453}

Here's a rule:

{F90454}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T4195

Differential Revision: https://secure.phabricator.com/D7782
2013-12-17 15:23:55 -08:00
..
aphlict Allow only one global top menu to be open at a time 2013-08-13 14:57:52 -07:00
auth Add Persona auth provider 2013-10-14 14:34:57 -07:00
config Allow custom fields to be reordered and disabled from Config 2013-07-09 08:27:19 -07:00
conpherence Conpherence - fix some ajax bugs 2013-06-11 15:07:53 -10:00
countdown Modernize Countdown somewhat 2013-07-23 06:16:19 -07:00
differential Don't mangle inline comments with tables in them in Differential 2013-09-10 15:31:32 -07:00
diffusion Line highlighting for pastes 2013-08-04 12:12:37 -07:00
doorkeeper Add remarkup support for Asana URIs 2013-06-24 15:55:08 -07:00
files Add an icon+background selector for project images 2013-10-17 09:32:34 -07:00
harbormaster Implement explicit build step ordering in Harbormaster 2013-12-06 14:12:15 +11:00
herald Add Herald support for blocking ref changes 2013-12-17 15:23:55 -08:00
maniphest Maniphest - fix a bug when selecting all tasks and then dragging them around 2013-11-11 16:08:23 -08:00
owners Allow excluding paths from package 2012-12-07 16:33:16 -08:00
passphrase Add "allow null" and username hinting to the Passphrase credential control 2013-11-22 14:35:35 -08:00
phame Use JsShrink if jsxmin is not available 2013-05-18 17:04:22 -07:00
pholio Pholio - back end for image re-ordering 2013-08-12 13:09:07 -07:00
phortune Allow PhortuneTestProvider to add payment methods 2013-04-25 09:50:08 -07:00
policy Allow "Custom" policies to be selected in the policy control 2013-10-14 16:59:16 -07:00
ponder Use PHUIRemarkupPreviewPanel in Ponder 2013-08-05 10:47:06 -07:00
projects Allow commits to be associated with projects and associated goodies 2012-08-08 10:03:41 -07:00
releeph Use JsShrink if jsxmin is not available 2013-05-18 17:04:22 -07:00
repository Removed getElementsByClassName in repositor-crossreference.js 2013-05-12 06:54:15 -07:00
search Simplify drag-and-drop list implementations 2013-06-05 17:36:33 -07:00
slowvote Use JsShrink if jsxmin is not available 2013-05-18 17:04:22 -07:00
transactions Transactions - make the details stuff generic and ajaxy 2013-08-22 16:45:14 -07:00
uiexample Fix more JavelinView example stuff 2013-07-16 13:46:49 -07:00