stable

Clone or download

Read-only

Associate build status to a commit instead of a pull request

Due to the changes introduced by the presence of Git references for each pull request, the existing scripts used to publish the status of a pull request need to be updated. To limit the confusion, a new route is created and the existing one is marked as deprecated. Statuses are attached to a commit, future usages of this could be to display the status of each commit of a PR or/and to display the statuses when bronsing the history from the web UI. This is part of story #11477: have a dedicated references for pullrequests Change-Id: If93f16d99e48370070535c508d2696ccf63c8876

Modified Files

Name
M plugins/git/db/install.sql +8 −0 Go to diff View file
A plugins/git/db/mysql/updates/2018/201806131045_add_table_commit_status.php +47 −0 Go to diff View file
A plugins/git/include/CommitStatus/CommitDoesNotExistException.php +29 −0 Go to diff View file
A plugins/git/include/CommitStatus/CommitStatus.php +34 −0 Go to diff View file
A plugins/git/include/CommitStatus/CommitStatusCreator.php +61 −0 Go to diff View file
A plugins/git/include/CommitStatus/CommitStatusDAO.php +50 −0 Go to diff View file
A plugins/git/include/CommitStatus/CommitStatusRetriever.php +49 −0 Go to diff View file
A plugins/git/include/CommitStatus/CommitStatusUnknown.php +47 −0 Go to diff View file
A plugins/git/include/CommitStatus/CommitStatusWithKnownStatus.php +100 −0 Go to diff View file
A plugins/git/include/CommitStatus/InvalidCommitReferenceException.php +25 −0 Go to diff View file
M plugins/git/include/REST/v1/BuildStatusPOSTRepresentation.php +8 −9 Go to diff View file
M plugins/git/include/REST/v1/RepositoryResource.class.php +68 −10 Go to diff View file
M plugins/git/include/autoload.php +10 −2 Go to diff View file
M plugins/git/include/constants.php +3 −1 Go to diff View file
A plugins/git/phpunit/CommitStatus/CommitStatusCreatorTest.php +98 −0 Go to diff View file
A plugins/git/phpunit/CommitStatus/CommitStatusRetrieverTest.php +70 −0 Go to diff View file
A plugins/git/phpunit/CommitStatus/CommitStatusWithKnownStatusTest.php +58 −0 Go to diff View file
M plugins/pullrequest/include/PullRequest/Exception/InvalidBuildStatusException.php +4 −1 Go to diff View file
M plugins/pullrequest/include/PullRequest/Factory.php +4 −1 Go to diff View file
M plugins/pullrequest/include/PullRequest/PullRequest.php +13 −1 Go to diff View file
M plugins/pullrequest/include/PullRequest/REST/v1/PullRequestRepresentation.php +4 −18 Go to diff View file
M plugins/pullrequest/include/PullRequest/REST/v1/PullRequestRepresentationFactory.php +49 −2 Go to diff View file
M plugins/pullrequest/include/PullRequest/REST/v1/PullRequestsResource.php +10 −2 Go to diff View file
M plugins/pullrequest/include/pullrequestPlugin.class.php +3 −0 Go to diff View file