justusbunsi
46c5ab2aec
Rename webhook_handler to api
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-10-10 16:18:14 +02:00
justusbunsi
e20b1469d3
Reduce UpdateStatus
parameter mess
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-10-10 16:14:09 +02:00
justusbunsi
57fc8054b2
Bot listens to actions via Gitea comments
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-10-10 15:58:03 +02:00
justusbunsi
3bab05bb71
Fix required header for SonarQube endpoint
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-10-10 13:07:10 +02:00
justusbunsi
8458815efe
Update dependencies
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-10-09 21:50:58 +02:00
justusbunsi
2873eb5159
Switch to gin-gonic as server
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-10-09 21:48:51 +02:00
justusbunsi
7c9fec06f9
Bump go version to 1.17
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-10-09 21:26:47 +02:00
justusbunsi
758e3c75cc
Switch to another default port
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-10-09 21:23:40 +02:00
justusbunsi
45fbfed51b
Split settings structs into separate files
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-10-09 21:10:30 +02:00
justusbunsi
aac7f5743d
Fix tests
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-10-09 21:09:23 +02:00
justusbunsi
c114d8ee0f
Care about documentation
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-10-09 20:46:12 +02:00
justusbunsi
34dbd4f609
Add status-check to PR/commit
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-10-09 20:45:21 +02:00
justusbunsi
d24bfdad4f
Replace violations with code_smells
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-10-09 20:44:09 +02:00
justusbunsi
e608a8f969
Retrieve actual data from SonarQube for comment
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-10-09 18:09:54 +02:00
justusbunsi
c3566d9208
Update dependencies
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-10-03 19:36:05 +02:00
justusbunsi
3e65387cd7
Bump Gitea-SDK to 1.15.0
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-10-03 17:57:52 +02:00
justusbunsi
a1990a60f4
Format code
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-10-03 17:57:22 +02:00
justusbunsi
16f545f179
Fix failing tests
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-10-03 17:49:23 +02:00
justusbunsi
1dab92385f
Fetch raw measures from SonarQube
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-07-12 16:58:48 +02:00
justusbunsi
a0f2684029
Add Gitea SDK to actually post a comment
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-07-12 12:58:06 +02:00
justusbunsi
2af7ba3da1
Make application runnable
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-07-11 15:17:03 +02:00
justusbunsi
630519f63a
Fix endpoint documentation
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-07-11 15:16:18 +02:00
justusbunsi
230e85875b
Parse pull request index from SQ branch name
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-07-11 14:44:10 +02:00
justusbunsi
b7fa2b77f9
Add tests for PR-only handling
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-07-11 12:28:00 +02:00
justusbunsi
5082e5d3f3
Use OOP-ish style for SonarQube webhook handling
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-06-29 12:27:01 +02:00
justusbunsi
86a644f31f
Use OOP-ish style for configuration loading
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-06-29 10:29:20 +02:00
justusbunsi
4ba781d74f
Respect go package concepts
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-06-29 08:09:21 +02:00
justusbunsi
7bfe729b67
Skip non-PR SonarQube webhooks from processing
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-06-24 16:52:06 +02:00
justusbunsi
c575542118
Add SonarQube endpoint
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-06-24 15:09:05 +02:00
justusbunsi
118c08090a
Add missing SQ communication in docs
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-06-24 11:13:42 +02:00
justusbunsi
e42c671689
Document TODOs
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-06-24 10:52:14 +02:00
justusbunsi
08eab186db
Let the bot panic if no project mapping provided
...
The bot cannot properly handle webhooks when no projects are configured.
So it is good to not let the bot run with such an invalid configuration.
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-06-24 10:36:52 +02:00
justusbunsi
6dfb2dd846
Properly map projects from SQ and Gitea in config
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-06-22 11:27:53 +02:00
justusbunsi
f84442009c
Allow loading token value from file reference
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-06-21 11:31:52 +02:00
justusbunsi
4797d38c70
Switch token configuration to object
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-06-21 11:08:56 +02:00
justusbunsi
9fc9323f23
Rewrite webhook config structure
...
It now allows more than just secret/secretFile.
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-06-21 11:02:16 +02:00
justusbunsi
71b19c35b8
Fix repository/project type from config
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-06-21 10:31:11 +02:00
justusbunsi
9c9b7588ab
Read webhook secret from file into configuration
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-06-20 19:47:55 +02:00
justusbunsi
6c2bb413cd
Allow passing environment variables into config
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-06-20 18:24:12 +02:00
justusbunsi
86ea377d64
Load gitea configuration from file
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-06-20 16:49:12 +02:00
justusbunsi
5c6229be8f
Allow custom config path via environment variable
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-06-20 15:39:54 +02:00
justusbunsi
706aeb0d0f
Load config.yaml from config directory
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-06-20 15:16:06 +02:00
justusbunsi
6d449ebb14
Respect common go project structure
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-06-20 15:14:26 +02:00
justusbunsi
d98545e90d
Add missing description in example config
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-06-06 17:19:02 +02:00
justusbunsi
84e9aa1152
Define configuration structure
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-06-06 17:15:01 +02:00
justusbunsi
99cd1366f8
Add development environment
...
- docker
- golang
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-06-06 17:14:57 +02:00
justusbunsi
30d1d6c12e
Follow advisory: Add license, DCO and contributing
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-06-06 17:11:38 +02:00
justusbunsi
4cb2138451
Visualize workflow
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-05-24 21:04:48 +02:00
justusbunsi
0bee87ab08
Initial commit
...
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
2021-05-24 21:03:41 +02:00