Commit eac4d89d authored by Simon Latapie's avatar Simon Latapie
Browse files

reword Rejected with Not Compliant

because the MR is not really "rejected" (not yet)
parent 343ad580
......@@ -16,9 +16,9 @@ stateDiagram
Submitted: MR Submitted
InReview: In Review
[*] --> Submitted: A VLC developer submitted
Submitted --> Rejected: NOT mergeable by gitlab
Submitted --> NotCompliant: NOT mergeable by gitlab
Submitted --> PipelineReady: mergeable by gitlab
PipelineReady --> Rejected: CI NOK
PipelineReady --> NotCompliant: CI NOK
PipelineReady --> Reviewable: CI OK
Reviewable --> InReview: Thread opened\nor\nAnother Developer voted
Reviewable --> Accepted: No vote\nNo thread opened\nduring 72h
......@@ -37,9 +37,9 @@ stateDiagram
Submitted: MR Submitted
InReview: In Review
[*] --> Submitted: A VLC developer submitted
Submitted --> Rejected: NOT mergeable by gitlab
Submitted --> NotCompliant: NOT mergeable by gitlab
Submitted --> PipelineReady: mergeable by gitlab
PipelineReady --> Rejected: CI NOK
PipelineReady --> NotCompliant: CI NOK
PipelineReady --> Reviewable: CI OK
Reviewable --> InReview: Thread opened\nor\nAnother Developer voted
InReview --> Acceptable: All threads resolved\nand\nlen(votes) > 0\nand\n Score > 0
......
......@@ -9,7 +9,7 @@ import (
// None state is used in case of errors in the graph traversal
const (
InitialState = GraphNode("Initial")
RejectedState = GraphNode("Rejected")
NotCompliantState = GraphNode("NotCompliant")
PipelineReadyState = GraphNode("PipelineReady")
ReviewableState = GraphNode("Reviewable")
InReviewState = GraphNode("InReview")
......@@ -92,8 +92,8 @@ func FindMRGraphState(mr *MergeRequest, graph []GraphEdge) (GraphNode, []Check)
// Note: transitions will be evaluated in the order of definitions
func UserAcceptanceGraph() []GraphEdge {
graph := []GraphEdge{}
graph = append(graph, GraphEdge{InitialState, CheckMergeable, PipelineReadyState, RejectedState})
graph = append(graph, GraphEdge{PipelineReadyState, CheckPipelines, ReviewableState, RejectedState})
graph = append(graph, GraphEdge{InitialState, CheckMergeable, PipelineReadyState, NotCompliantState})
graph = append(graph, GraphEdge{PipelineReadyState, CheckPipelines, ReviewableState, NotCompliantState})
graph = append(graph, SimpleEdge(ReviewableState, CheckVoteOrThread, InReviewState))
graph = append(graph, SimpleEdge(InReviewState, CheckAllThreadResolvedAndDevScoreStrict, AcceptableState))
graph = append(graph, SimpleEdge(AcceptableState, CheckIsNotActiveAnymoreUser, AcceptedState))
......@@ -106,8 +106,8 @@ func UserAcceptanceGraph() []GraphEdge {
// Note: transitions will be evaluated in the order of definitions
func DeveloperAcceptanceGraph() []GraphEdge {
graph := []GraphEdge{}
graph = append(graph, GraphEdge{InitialState, CheckMergeable, PipelineReadyState, RejectedState})
graph = append(graph, GraphEdge{PipelineReadyState, CheckPipelines, ReviewableState, RejectedState})
graph = append(graph, GraphEdge{InitialState, CheckMergeable, PipelineReadyState, NotCompliantState})
graph = append(graph, GraphEdge{PipelineReadyState, CheckPipelines, ReviewableState, NotCompliantState})
graph = append(graph, SimpleEdge(ReviewableState, CheckVoteOrThread, InReviewState))
graph = append(graph, SimpleEdge(ReviewableState, CheckNoActivity, AcceptedState))
graph = append(graph, SimpleEdge(InReviewState, CheckAllThreadResolvedAndDevScoreNonStrict, AcceptableState))
......
......@@ -15,7 +15,7 @@ const (
rootURLEnvVar = "GITLAB_API_ROOT_URL"
defaultAPIRootURL = "https://code.videolan.org/api/v4"
acceptedLabel = "Accepted"
rejectedLabel = "Rejected"
notCompliantLabel = "NotCompliant"
metadataPrefixBase64 = "homerbotmeta-base64:"
messageTypeReport = "report"
messageTypeWelcome = "welcome"
......@@ -88,7 +88,7 @@ func generateReport(mr MergeRequest, success bool, checks []Check) string {
report += fmt.Sprintln(details)
report += fmt.Sprintln("</p></details>")
// Add a message identifier (maybe for future use)
metadata := Metadata{MessageType: messageTypeReport, ReportResult: rejectedLabel}
metadata := Metadata{MessageType: messageTypeReport, ReportResult: notCompliantLabel}
if success {
metadata.ReportResult = acceptedLabel
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment