If else in json payload of webhook #127694
Unanswered
webhookaaaa
asked this question in
API and Webhooks
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Select Topic Area
Question
Body
Hi Everyone, I need a help on GITHUB JSON payload i am trying to achieve this as below . I have the below payload where in the state is returned as FAILURE and SUCCESS from Build tool , we need to change this to failed and success state as GITHUB expects it .GITHUB accepts states as success,failure,error and pending.Build tool send states as SUCCESS,FAILED and UNKNOWN How can i do it using JSON if and else ?
Payload :- **{"state":"${'${buildtool.buildState}'?lower_case}","target_url":"${buildtool.buildResultsUrl}","description":"${buildtool.buildState}","context":"continuous-integration/buildtool"}**
Beta Was this translation helpful? Give feedback.
All reactions