Change internal name
Signed-off-by: Steven Kriegler <sk.bunsenbrenner@gmail.com>
This commit is contained in:
parent
d943a7f420
commit
51211d77cd
|
@ -15,10 +15,10 @@
|
|||
|
||||
```bash
|
||||
# Build docker environment
|
||||
docker build -t gitea-sonarqube-pr-bot/dev -f contrib/Dockerfile contrib
|
||||
docker build -t gitea-sonarqube-bot/dev -f contrib/Dockerfile contrib
|
||||
|
||||
# Start the environment
|
||||
docker run --rm -it -p 49182:3000 -v "$(pwd):/projects" gitea-sonarqube-pr-bot/dev
|
||||
docker run --rm -it -p 49182:3000 -v "$(pwd):/projects" gitea-sonarqube-bot/dev
|
||||
```
|
||||
|
||||
## Build and Run
|
||||
|
@ -55,7 +55,7 @@ make helm-params
|
|||
For local purposes
|
||||
|
||||
```bash
|
||||
docker build -t gitea-sonarqube-pr-bot/prod .
|
||||
docker build -t gitea-sonarqube-bot/prod .
|
||||
```
|
||||
|
||||
**Docker image**
|
||||
|
|
|
@ -11,10 +11,10 @@ import (
|
|||
"syscall"
|
||||
"time"
|
||||
|
||||
"gitea-sonarqube-pr-bot/internal/api"
|
||||
giteaSdk "gitea-sonarqube-pr-bot/internal/clients/gitea"
|
||||
sonarQubeSdk "gitea-sonarqube-pr-bot/internal/clients/sonarqube"
|
||||
"gitea-sonarqube-pr-bot/internal/settings"
|
||||
"gitea-sonarqube-bot/internal/api"
|
||||
giteaSdk "gitea-sonarqube-bot/internal/clients/gitea"
|
||||
sonarQubeSdk "gitea-sonarqube-bot/internal/clients/sonarqube"
|
||||
"gitea-sonarqube-bot/internal/settings"
|
||||
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
|
|
@ -5,10 +5,10 @@ import (
|
|||
"log"
|
||||
"net/http"
|
||||
|
||||
giteaSdk "gitea-sonarqube-pr-bot/internal/clients/gitea"
|
||||
sqSdk "gitea-sonarqube-pr-bot/internal/clients/sonarqube"
|
||||
"gitea-sonarqube-pr-bot/internal/settings"
|
||||
webhook "gitea-sonarqube-pr-bot/internal/webhooks/gitea"
|
||||
giteaSdk "gitea-sonarqube-bot/internal/clients/gitea"
|
||||
sqSdk "gitea-sonarqube-bot/internal/clients/sonarqube"
|
||||
"gitea-sonarqube-bot/internal/settings"
|
||||
webhook "gitea-sonarqube-bot/internal/webhooks/gitea"
|
||||
)
|
||||
|
||||
type GiteaWebhookHandlerInferface interface {
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
"gitea-sonarqube-pr-bot/internal/settings"
|
||||
"gitea-sonarqube-bot/internal/settings"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
|
|
@ -9,9 +9,9 @@ import (
|
|||
"os"
|
||||
"testing"
|
||||
|
||||
giteaSdk "gitea-sonarqube-pr-bot/internal/clients/gitea"
|
||||
sqSdk "gitea-sonarqube-pr-bot/internal/clients/sonarqube"
|
||||
"gitea-sonarqube-pr-bot/internal/settings"
|
||||
giteaSdk "gitea-sonarqube-bot/internal/clients/gitea"
|
||||
sqSdk "gitea-sonarqube-bot/internal/clients/sonarqube"
|
||||
"gitea-sonarqube-bot/internal/settings"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
|
|
@ -7,10 +7,10 @@ import (
|
|||
"net/http"
|
||||
"strings"
|
||||
|
||||
giteaSdk "gitea-sonarqube-pr-bot/internal/clients/gitea"
|
||||
sqSdk "gitea-sonarqube-pr-bot/internal/clients/sonarqube"
|
||||
"gitea-sonarqube-pr-bot/internal/settings"
|
||||
webhook "gitea-sonarqube-pr-bot/internal/webhooks/sonarqube"
|
||||
giteaSdk "gitea-sonarqube-bot/internal/clients/gitea"
|
||||
sqSdk "gitea-sonarqube-bot/internal/clients/sonarqube"
|
||||
"gitea-sonarqube-bot/internal/settings"
|
||||
webhook "gitea-sonarqube-bot/internal/webhooks/sonarqube"
|
||||
)
|
||||
|
||||
type SonarQubeWebhookHandlerInferface interface {
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"regexp"
|
||||
"testing"
|
||||
|
||||
"gitea-sonarqube-pr-bot/internal/settings"
|
||||
"gitea-sonarqube-bot/internal/settings"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
|
|
@ -2,7 +2,7 @@ package gitea
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"gitea-sonarqube-pr-bot/internal/settings"
|
||||
"gitea-sonarqube-bot/internal/settings"
|
||||
"log"
|
||||
|
||||
"code.gitea.io/sdk/gitea"
|
||||
|
@ -31,7 +31,7 @@ func (sdk *GiteaSdk) PostComment(repo settings.GiteaRepository, idx int, msg str
|
|||
func (sdk *GiteaSdk) UpdateStatus(repo settings.GiteaRepository, ref string, details StatusDetails) error {
|
||||
opt := gitea.CreateStatusOption{
|
||||
TargetURL: details.Url,
|
||||
Context: "gitea-sonarqube-pr-bot",
|
||||
Context: "gitea-sonarqube-bot",
|
||||
Description: details.Message,
|
||||
State: gitea.StatusState(details.State),
|
||||
}
|
||||
|
|
|
@ -10,8 +10,8 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
"gitea-sonarqube-pr-bot/internal/actions"
|
||||
"gitea-sonarqube-pr-bot/internal/settings"
|
||||
"gitea-sonarqube-bot/internal/actions"
|
||||
"gitea-sonarqube-bot/internal/settings"
|
||||
)
|
||||
|
||||
func ParsePRIndex(name string) (int, error) {
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"regexp"
|
||||
"testing"
|
||||
|
||||
"gitea-sonarqube-pr-bot/internal/settings"
|
||||
"gitea-sonarqube-bot/internal/settings"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
|
|
@ -26,7 +26,7 @@ sonarqube:
|
|||
additionalMetrics: []
|
||||
projects:
|
||||
- sonarqube:
|
||||
key: gitea-sonarqube-pr-bot
|
||||
key: gitea-sonarqube-bot
|
||||
gitea:
|
||||
owner: example-organization
|
||||
name: pr-bot
|
||||
|
@ -130,7 +130,7 @@ sonarqube:
|
|||
additionalMetrics: "new_security_hotspots"
|
||||
projects:
|
||||
- sonarqube:
|
||||
key: gitea-sonarqube-pr-bot
|
||||
key: gitea-sonarqube-bot
|
||||
gitea:
|
||||
owner: example-organization
|
||||
name: pr-bot
|
||||
|
@ -203,7 +203,7 @@ sonarqube:
|
|||
value: fake-sonarqube-token
|
||||
projects:
|
||||
- sonarqube:
|
||||
key: gitea-sonarqube-pr-bot
|
||||
key: gitea-sonarqube-bot
|
||||
gitea:
|
||||
owner: example-organization
|
||||
name: pr-bot
|
||||
|
@ -261,7 +261,7 @@ func TestLoadProjectsStructure(t *testing.T) {
|
|||
expectedProjects := []Project{
|
||||
{
|
||||
SonarQube: struct{ Key string }{
|
||||
Key: "gitea-sonarqube-pr-bot",
|
||||
Key: "gitea-sonarqube-bot",
|
||||
},
|
||||
Gitea: GiteaRepository{
|
||||
Owner: "example-organization",
|
||||
|
@ -319,7 +319,7 @@ sonarqube:
|
|||
additionalMetrics: "new_security_hotspots"
|
||||
projects:
|
||||
- sonarqube:
|
||||
key: gitea-sonarqube-pr-bot
|
||||
key: gitea-sonarqube-bot
|
||||
gitea:
|
||||
owner: example-organization
|
||||
name: pr-bot
|
||||
|
|
|
@ -5,10 +5,10 @@ import (
|
|||
"fmt"
|
||||
"log"
|
||||
|
||||
"gitea-sonarqube-pr-bot/internal/actions"
|
||||
giteaSdk "gitea-sonarqube-pr-bot/internal/clients/gitea"
|
||||
sqSdk "gitea-sonarqube-pr-bot/internal/clients/sonarqube"
|
||||
"gitea-sonarqube-pr-bot/internal/settings"
|
||||
"gitea-sonarqube-bot/internal/actions"
|
||||
giteaSdk "gitea-sonarqube-bot/internal/clients/gitea"
|
||||
sqSdk "gitea-sonarqube-bot/internal/clients/sonarqube"
|
||||
"gitea-sonarqube-bot/internal/settings"
|
||||
)
|
||||
|
||||
type issue struct {
|
||||
|
|
|
@ -5,9 +5,9 @@ import (
|
|||
"fmt"
|
||||
"log"
|
||||
|
||||
giteaSdk "gitea-sonarqube-pr-bot/internal/clients/gitea"
|
||||
sqSdk "gitea-sonarqube-pr-bot/internal/clients/sonarqube"
|
||||
"gitea-sonarqube-pr-bot/internal/settings"
|
||||
giteaSdk "gitea-sonarqube-bot/internal/clients/gitea"
|
||||
sqSdk "gitea-sonarqube-bot/internal/clients/sonarqube"
|
||||
"gitea-sonarqube-bot/internal/settings"
|
||||
)
|
||||
|
||||
type pullRequest struct {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"encoding/json"
|
||||
"log"
|
||||
|
||||
sqSdk "gitea-sonarqube-pr-bot/internal/clients/sonarqube"
|
||||
sqSdk "gitea-sonarqube-bot/internal/clients/sonarqube"
|
||||
)
|
||||
|
||||
type properties struct {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"regexp"
|
||||
"testing"
|
||||
|
||||
"gitea-sonarqube-pr-bot/internal/settings"
|
||||
"gitea-sonarqube-bot/internal/settings"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
|
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,10 +1,10 @@
|
|||
{
|
||||
"name": "gitea-sonarqube-pr-bot",
|
||||
"name": "gitea-sonarqube-bot",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "gitea-sonarqube-pr-bot",
|
||||
"name": "gitea-sonarqube-bot",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"readme-generator-for-helm": "https://github.com/bitnami-labs/readme-generator-for-helm/tarball/main"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "gitea-sonarqube-pr-bot",
|
||||
"name": "gitea-sonarqube-bot",
|
||||
"description": "Integrate SonarQube analysis into Gitea Pull Requests",
|
||||
"author": "Steven Kriegler <sk.bunsenbrenner@gmail.com>",
|
||||
"license": "MIT",
|
||||
|
|
Loading…
Reference in a new issue