]> khamidou — GitHub mirrors - arcanist.git/commit
Remove client-side commit message validation from Arcanist
authorepriestley <git@epriestley.com>
Thu, 1 Dec 2011 23:50:44 +0000 (15:50 -0800)
committerepriestley <git@epriestley.com>
Fri, 2 Dec 2011 15:29:31 +0000 (07:29 -0800)
commit79da3a6ff9a97bf077b47eeef9131f97a81904f3
tree4343c508c6b735f683ebe0eef2079f7d57c8a948
parentd81d97f9c608d2e7585e6505a5b9d196ba2522bf
Remove client-side commit message validation from Arcanist

Summary:
Commit templates are fully configurable on the server now, so we should be doing
validation there, since an install can add or remove fields and change
validation rules. Remove these outdated client validations, as per comment.

Also update the API call to use the 'errors' field, which allows us to show the
user all the parse errors at once. See:

https://secure.phabricator.com/diffusion/P/browse/origin:master/src/applications/conduit/method/differential/parsecommitmessage/ConduitAPI_differential_parsecommitmessage_Method.php;cfaab709df37739b$75

Test Plan:
Ran "arc diff" on a change with multiple errors:

```$ arc diff --conduit-uri=http://local.aphront.com/
Usage Exception: Commit message is not properly formatted:

Error parsing field 'Reviewers': Commit message references nonexistent users:
jjjderp.
Error parsing field 'CC': Commit message references nonexistent users and
mailing lists: jjjderp.

You should use the standard git commit template to provide a commit message. If
you only want to create a diff (not a revision), use --preview to ignore commit
messages.```

Reviewers: btrahan, jungejason

Reviewed By: btrahan

CC: aran, btrahan
Differential Revision: 1154
src/differential/commitmessage/ArcanistDifferentialCommitMessage.php
src/differential/commitmessage/ArcanistDifferentialCommitMessageParserException.php
src/differential/commitmessage/__init__.php
src/workflow/diff/ArcanistDiffWorkflow.php