Set analysis status on PR creation

Signed-off-by: Steven Kriegler <sk.bunsenbrenner@gmail.com>
This commit is contained in:
justusbunsi 2021-10-13 08:54:21 +02:00
parent dfffd17223
commit 90581744ff
No known key found for this signature in database
GPG key ID: 82B29BF2507F9F8B
2 changed files with 3 additions and 2 deletions

View file

@ -81,6 +81,7 @@ See [SonarQube docs](https://docs.sonarqube.org/latest/project-administration/we
- [x] Official image for containerized hosting
- [x] Helm chart for Kubernetes
- [ ] Publish Helm chart + docker image
- [x] Respect `"action": "opened"` PR event for updating status check
### Possible improvements

View file

@ -54,8 +54,8 @@ func (w *PullWebhook) Validate() error {
return fmt.Errorf("ignore hook for non-configured project '%s/%s'", owner, name)
}
if w.Action != "synchronized" {
return fmt.Errorf("ignore hook for action others than synchronized")
if w.Action != "synchronized" && w.Action != "opened" {
return fmt.Errorf("ignore hook for action others than 'opened' or 'synchronized'")
}
w.Repository = settings.GiteaRepository{