You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
aya/.melodium-ci/report.mel

24 lines
1.3 KiB
Plaintext

use cicd/services/github::postGithubStateContext
use cicd/services/github::|pending
use cicd/services/github::|success
use cicd/services/github::|error
use cicd/services/github::|failure
use javascript::JavaScriptEngine
use log/logger::Logger
treatment reportState[logger: Logger, github_contexts: JavaScriptEngine](name: string, description: string, log_response: bool)
input pending: Block<void>
input success: Block<void>
input error: Block<void>
input failure: Block<void>
{
pendingState: postGithubStateContext[contexts=github_contexts, logger=logger](state = |pending(), name = name, description = description, log_response = log_response)
successState: postGithubStateContext[contexts=github_contexts, logger=logger](state = |success(), name = name, description = description, log_response = log_response)
errorState: postGithubStateContext[contexts=github_contexts, logger=logger](state = |error(), name = name, description = description, log_response = log_response)
failureState: postGithubStateContext[contexts=github_contexts, logger=logger](state = |failure(), name = name, description = description, log_response = log_response)
Self.pending -> pendingState.trigger
Self.success -> successState.trigger
Self.error ---> errorState.trigger
Self.failure -> failureState.trigger
}