You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// RequestLandStrategyMerge merges commits into the target branch by creating a separate merge commit, preserving the commit history along with hashes.
20
-
RequestLandStrategyMerge=3
21
+
RequestLandStrategyMergeRequestLandStrategy=3
21
22
)
22
23
24
+
// RequestState defines the possible states of a land request.
23
25
typeRequestStateint
24
26
25
27
// TODO: define all states
28
+
// do not use iota here, as values should be fixed and consistent across versions.
26
29
const (
27
30
// RequestStateUnknown is the unreachable state. It is set by default when the structure is initialized. It should never be seen in the system.
28
31
RequestStateUnknownRequestState=0
29
32
// RequestStateNew is the initial state of a land request. It is confirmed by the system but the processing is not started yet.
30
33
RequestStateNewRequestState=1
31
34
// RequestStateProcessing is the state of a land request that is being processed.
32
-
RequestStateProcessing=2
35
+
RequestStateProcessingRequestState=2
33
36
// RequestStateLanded is the state of a land request that has been successfully processed and landed. This is the final state.
34
-
RequestStateLanded=3
37
+
RequestStateLandedRequestState=3
35
38
// RequestStateError is the state of a land request that has encountered an error. This is the final state.
36
-
RequestStateError=4
39
+
RequestStateErrorRequestState=4
37
40
)
38
41
39
42
// Change represents a set of related code changes identified by one or more IDs from a particular code change provider, like Github Pull Requests.
return entities.Request{}, fmt.Errorf("failed to insert request entity queue=%s change=%v: exceeded %d retry attempts due to primary key conflicts", queue, change, maxCreateRetries)
29
106
}
30
107
31
108
// UpdateState updates the state of a land request if the current version matches the expected version. If versions do not match, returns ErrVersionMismatch.
32
-
// The implementation should increment the version by 1 atomically with the state update.
109
+
// The implementation increments the version by 1 atomically with the state update.
0 commit comments