This repository has been archived by the owner on Jun 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Make relatedTicket mandatory in the PR's description #94
Merged
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
<!-- PR_TABLE_DESCRIPTION_ERROR --> | ||
Hi! | ||
Hi, thanks for this contribution! | ||
|
||
Your pull request description seems to be incomplete or malformed: | ||
|
||
{% for error in errors %} | ||
* {{ error.message }} | ||
{% endfor %} | ||
|
||
Would you mind completing the contribution table ? This would help us understand how interesting your contribution is. | ||
|
||
Thank you! | ||
Would you mind completing it? This would help us understand how interesting your contribution is, thank you very much! | ||
|
||
(note: this is an automated message, but answering it will reach a real human ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?php | ||
|
||
namespace Tests\AppBundle\PullRequests; | ||
|
||
use AppBundle\PullRequests\BodyParser; | ||
use PHPUnit\Framework\TestCase; | ||
use Symfony\Component\Validator\ValidatorBuilder; | ||
|
||
class ListenerTest extends TestCase | ||
{ | ||
|
||
private $validator; | ||
|
||
public function setUp() | ||
{ | ||
$this->validator = (new ValidatorBuilder()) | ||
->enableAnnotationMapping() | ||
->getValidator(); | ||
} | ||
|
||
/** | ||
* @dataProvider getTests | ||
* | ||
* @param $description | ||
* @param $expected | ||
*/ | ||
public function testDescriptions($descriptionFilename, $expected) | ||
{ | ||
$body = file_get_contents(__DIR__.'/../../Resources/PullRequestBody/'.$descriptionFilename); | ||
$bodyParser = new BodyParser($body); | ||
|
||
$validations = $this->validator->validate($bodyParser); | ||
$this->assertEquals(count($expected), count($validations)); | ||
foreach ($validations as $validation) { | ||
$this->assertContains($validation->getPropertyPath(), $expected); | ||
} | ||
} | ||
|
||
public function getTests() | ||
{ | ||
return [ | ||
'Valid description' => [ | ||
'bug_fix.txt', | ||
[], | ||
], | ||
'Missing description' => [ | ||
'missing_description.txt', | ||
['description'], | ||
], | ||
'Invalid type' => [ | ||
'invalid_type.txt', | ||
['type'], | ||
], | ||
'Invalid category' => [ | ||
'invalid_category.txt', | ||
['category'], | ||
], | ||
'No related ticked' => [ | ||
'no_related_ticket.txt', | ||
['relatedTicket'], | ||
], | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!-- Thank you for contributing to the PrestaShop project! | ||
|
||
Please take the time to edit the "Answers" rows with the necessary information:--> | ||
|
||
| Questions | Answers | ||
| ------------- | ------------------------------------------------------- | ||
| Branch? | develop | ||
| Description? | Such a great description | ||
| Type? | bug fix | ||
| Category? | AZ | ||
| BC breaks? | no | ||
| Deprecations? | yes | ||
| Fixed ticket? | #1234 | ||
| How to test? | To test it, launch unit tests | ||
|
||
<!-- Click the form's "Preview button" to make sure the table is functional in GitHub. Thank you! --> | ||
|
||
#### Important guidelines | ||
|
||
* Make sure [your local branch is up to date](https://help.github.com/articles/syncing-a-fork/) before commiting your changes! | ||
* Your code MUST respect [our Coding Standards](http://doc.prestashop.com/display/PS16/Coding+Standards) (for code written in PHP, JavaScript, HTML/CSS/Smarty/Twig, SQL)! | ||
* Your commit name MUST respect our [naming convention](http://doc.prestashop.com/display/PS16/How+to+write+a+commit+message)! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!-- Thank you for contributing to the PrestaShop project! | ||
|
||
Please take the time to edit the "Answers" rows with the necessary information:--> | ||
|
||
| Questions | Answers | ||
| ------------- | ------------------------------------------------------- | ||
| Branch? | develop | ||
| Description? | Such a great description | ||
| Type? | | ||
| Category? | BO | ||
| BC breaks? | no | ||
| Deprecations? | yes | ||
| Fixed ticket? | #1234 | ||
| How to test? | To test it, launch unit tests | ||
|
||
<!-- Click the form's "Preview button" to make sure the table is functional in GitHub. Thank you! --> | ||
|
||
#### Important guidelines | ||
|
||
* Make sure [your local branch is up to date](https://help.github.com/articles/syncing-a-fork/) before commiting your changes! | ||
* Your code MUST respect [our Coding Standards](http://doc.prestashop.com/display/PS16/Coding+Standards) (for code written in PHP, JavaScript, HTML/CSS/Smarty/Twig, SQL)! | ||
* Your commit name MUST respect our [naming convention](http://doc.prestashop.com/display/PS16/How+to+write+a+commit+message)! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!-- Thank you for contributing to the PrestaShop project! | ||
|
||
Please take the time to edit the "Answers" rows with the necessary information:--> | ||
|
||
| Questions | Answers | ||
| ------------- | ------------------------------------------------------- | ||
| Branch? | develop | ||
| Description? | | ||
| Type? | bug fix | ||
| Category? | BO | ||
| BC breaks? | no | ||
| Deprecations? | yes | ||
| Fixed ticket? | #1234 | ||
| How to test? | To test it, launch unit tests | ||
|
||
<!-- Click the form's "Preview button" to make sure the table is functional in GitHub. Thank you! --> | ||
|
||
#### Important guidelines | ||
|
||
* Make sure [your local branch is up to date](https://help.github.com/articles/syncing-a-fork/) before commiting your changes! | ||
* Your code MUST respect [our Coding Standards](http://doc.prestashop.com/display/PS16/Coding+Standards) (for code written in PHP, JavaScript, HTML/CSS/Smarty/Twig, SQL)! | ||
* Your commit name MUST respect our [naming convention](http://doc.prestashop.com/display/PS16/How+to+write+a+commit+message)! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!-- Thank you for contributing to the PrestaShop project! | ||
|
||
Please take the time to edit the "Answers" rows with the necessary information:--> | ||
|
||
| Questions | Answers | ||
| ------------- | ------------------------------------------------------- | ||
| Branch? | develop | ||
| Description? | Such a great description | ||
| Type? | bug fix | ||
| Category? | BO | ||
| BC breaks? | no | ||
| Deprecations? | yes | ||
| Fixed ticket? | | ||
| How to test? | To test it, launch unit tests | ||
|
||
<!-- Click the form's "Preview button" to make sure the table is functional in GitHub. Thank you! --> | ||
|
||
#### Important guidelines | ||
|
||
* Make sure [your local branch is up to date](https://help.github.com/articles/syncing-a-fork/) before commiting your changes! | ||
* Your code MUST respect [our Coding Standards](http://doc.prestashop.com/display/PS16/Coding+Standards) (for code written in PHP, JavaScript, HTML/CSS/Smarty/Twig, SQL)! | ||
* Your commit name MUST respect our [naming convention](http://doc.prestashop.com/display/PS16/How+to+write+a+commit+message)! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.