Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

Commit

Permalink
complete Pull request template validation
Browse files Browse the repository at this point in the history
  • Loading branch information
mickaelandrieu committed Jun 16, 2016
1 parent 452961c commit f10cb5e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/AppBundle/PullRequests/BodyParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ public function getDescription()
}

/**
* @Assert\Choice(choices = {"feature", "improvement", "fix"},
* message = "The `type` should be one of: `new feature`, `improvement`, `bug fix`.")
* @Assert\Choice(choices = {"feature", "improvement", "fix", "refacto"},
* message = "The `type` should be one of: `new feature`, `improvement`, `bug fix`, `refacto`.")
*/
public function getType()
{
Expand All @@ -50,6 +50,11 @@ public function getType()
return $this->extractWithRegex($regex);
}

/**
* @Assert\Choice(choices = {"FO", "BO", "CO", "IN", "TE", "WS"},
* message = "The `category` should be one of: `FO`, `BO`, `CO`, `IN`, `TE`, `WS`"
* )
*/
public function getCategory()
{
$regex = "/(\|[[:space:]]Category\?[[:space:]]+\|[[:space:]])(.+)\r\n/";
Expand Down

0 comments on commit f10cb5e

Please sign in to comment.