mirror of
https://github.com/harness/drone.git
synced 2025-05-04 16:52:22 +08:00
feat: [CODE-2312]: Update UI labels for audit service (#2805)
* feat: [CODE-2312]: revert go-sdk changes in all places * feat: [CODE-2312]: revert go.mod changes * feat: [CODE-2312]: fresh reset * feat: [CODE-2312]: go.mod changes * feat: [CODE-2312]: address resourcename to commit.go * Merge branch 'main' into akp/CODE-2312 * feat: [CODE-2312]: address resourcename to commit.go * feat: [CODE-2312]: address resourcename to commit.go * feat: [CODE-2312]: address failure due to exceeding limit on resource labels * feat: [CODE-2312]: lint * feat: [CODE-2312]: MERGE * feat: [CODE-2312]: Update wire * feat: [CODE-2312]: update ui labels * feat: [CODE-2312]: update resource and action * feat: [CODE-2312]: Audit log new action : bypassed * feat: [CODE-2312]: audit log object update * Merge branch 'main' into akp/CODE-2312 * feat: [CODE-2312]: audit logging changes for commit, merge, create and delete branch * Merge branch 'main' into akp/CODE-2312 * Merge branch 'main' into akp/CODE-2312 * feat: [CODE-2312]: introduce parser and enclosing method * feat: [CODE-2312]: annotate error * feat: [CODE-2312]: name change and todo removal * feat: [CODE-2312]: Annotate errors * feat: [CODE-2232]: Branch Rules: UserGroup support: Create and List
This commit is contained in:
parent
2606389e85
commit
3ef7f9f55a
@ -568,6 +568,12 @@ func (c *Controller) Merge(
|
|||||||
audit.BypassedResourceTypePullRequest,
|
audit.BypassedResourceTypePullRequest,
|
||||||
audit.BypassedResourceName,
|
audit.BypassedResourceName,
|
||||||
strconv.FormatInt(pr.Number, 10),
|
strconv.FormatInt(pr.Number, 10),
|
||||||
|
audit.ResourceName,
|
||||||
|
fmt.Sprintf(
|
||||||
|
audit.BypassPullReqLabelFormat,
|
||||||
|
sourceRepo.Identifier,
|
||||||
|
strconv.FormatInt(pr.Number, 10),
|
||||||
|
),
|
||||||
audit.BypassAction,
|
audit.BypassAction,
|
||||||
audit.BypassActionMerged,
|
audit.BypassActionMerged,
|
||||||
),
|
),
|
||||||
|
@ -174,6 +174,11 @@ func (c *Controller) CommitFiles(ctx context.Context,
|
|||||||
audit.BypassedResourceTypeCommit,
|
audit.BypassedResourceTypeCommit,
|
||||||
audit.BypassedResourceName,
|
audit.BypassedResourceName,
|
||||||
commit.CommitID.String(),
|
commit.CommitID.String(),
|
||||||
|
fmt.Sprintf(
|
||||||
|
audit.BypassSHALabelFormat,
|
||||||
|
repo.Identifier,
|
||||||
|
commit.CommitID.String()[0:6],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
audit.ActionBypassed,
|
audit.ActionBypassed,
|
||||||
paths.Parent(repo.Path),
|
paths.Parent(repo.Path),
|
||||||
|
@ -123,6 +123,12 @@ func (c *Controller) CreateBranch(ctx context.Context,
|
|||||||
branch.Name,
|
branch.Name,
|
||||||
audit.BypassAction,
|
audit.BypassAction,
|
||||||
audit.BypassActionCreated,
|
audit.BypassActionCreated,
|
||||||
|
audit.ResourceName,
|
||||||
|
fmt.Sprintf(
|
||||||
|
audit.BypassSHALabelFormat,
|
||||||
|
repo.Identifier,
|
||||||
|
branch.Name,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
audit.ActionBypassed,
|
audit.ActionBypassed,
|
||||||
paths.Parent(repo.Path),
|
paths.Parent(repo.Path),
|
||||||
|
@ -110,6 +110,12 @@ func (c *Controller) DeleteBranch(ctx context.Context,
|
|||||||
branchName,
|
branchName,
|
||||||
audit.BypassAction,
|
audit.BypassAction,
|
||||||
audit.BypassActionDeleted,
|
audit.BypassActionDeleted,
|
||||||
|
audit.ResourceName,
|
||||||
|
fmt.Sprintf(
|
||||||
|
audit.BypassSHALabelFormat,
|
||||||
|
repo.Identifier,
|
||||||
|
branchName,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
audit.ActionBypassed,
|
audit.ActionBypassed,
|
||||||
paths.Parent(repo.Path),
|
paths.Parent(repo.Path),
|
||||||
|
@ -31,6 +31,7 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
ResourceName = "resourceName"
|
||||||
RepoName = "repoName"
|
RepoName = "repoName"
|
||||||
BypassedResourceType = "bypassedResourceType"
|
BypassedResourceType = "bypassedResourceType"
|
||||||
BypassedResourceName = "bypassedResourceName"
|
BypassedResourceName = "bypassedResourceName"
|
||||||
@ -43,6 +44,8 @@ const (
|
|||||||
BypassActionCreated = "created"
|
BypassActionCreated = "created"
|
||||||
BypassActionCommitted = "committed"
|
BypassActionCommitted = "committed"
|
||||||
BypassActionMerged = "merged"
|
BypassActionMerged = "merged"
|
||||||
|
BypassSHALabelFormat = "%s @%s"
|
||||||
|
BypassPullReqLabelFormat = "%s #%s"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Action string
|
type Action string
|
||||||
|
Loading…
Reference in New Issue
Block a user