mariusz-kraj / gitlab-reporter
Simple package for reporting bugs results to the Gitlab.com merge request in form of the comments
Installs: 1 557
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ~7.1
- guzzlehttp/guzzle: ^6.3
- jean85/pretty-package-versions: ^1.0.2
- symfony/console: ^3.3
- symfony/yaml: ^3.3
README
Instalation
- Install from composer
composer require --dev "mariusz-kraj/gitlab-reporter:*"
- Add config file ".gitlab-ci-reporter.yml" in the root of your project:
reporters: phpunit: path: 'tests/_output/report.xml' failIfNotFound: true phpcs: path: 'build/phpcs.xml' failIfNotFound: true phpmd: path: 'build/phpmd.xml' failIfNotFound: true
- Add 'after_' to your "gitlab-ci.yml":
after_script: - bin/gitlab-reporter publish
-
Generate access code and add secret variable
- Go to access token
- Give access to API
- Copy token
- Go to the Project > Settings > CI\CD > Secret Variables
- Create ACCESS TOKEN variable with the token as a value
-
Create a new merge request and wait for comments!
To Do
- Tests
- Documentation
- Config validation
- PHPUnit Coverage reports
- Comments with attachments
- Changing state of merge request depending on the reports
- Instructions for contributors
Limitations
- Gitlab CI doesn't have environmental variable with merge request id,library is searching for MR from current branch. If there would be more than one MR from one branch (why?) it will take the first one and ignore rest