Created
April 10, 2016 16:50
-
-
Save opn/2c3e4079bb2678091aa3afe28ae35d3e to your computer and use it in GitHub Desktop.
This is just a test for a private function.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private function _constructIssueJSON someTitle, pBody, pAssignee, pMilestone, pLabelArray | |
put someTitle into jsonArray ["title"] | |
if pBody is not empty then | |
put pBody into jsonArray ["body"] | |
end if | |
if pAssignee is not empty then put pAssignee into jsonArray ["assignee"] | |
if pMilestone is not empty then put pMilestone into jsonArray ["milestone"] | |
if pLabelArray is an array then | |
put pLabelArray into jsonArray ["labels"] | |
else if pLabelArray is not empty then | |
replace CR with comma in pLabelArray | |
split pLabelArray with comma | |
put pLabelArray into jsonArray ["labels"] | |
end if | |
put json_FromArray (jsonArray) into someJSON | |
return someJSON | |
end _constructIssueJSON |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment