Skip to content

Instantly share code, notes, and snippets.

@opn
Created April 10, 2016 16:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save opn/2c3e4079bb2678091aa3afe28ae35d3e to your computer and use it in GitHub Desktop.
Save opn/2c3e4079bb2678091aa3afe28ae35d3e to your computer and use it in GitHub Desktop.
This is just a test for a private function.
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