Skip to content

Commit

Permalink
Merge origin/master into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonia Heinen committed Jul 11, 2024
2 parents e1ed32c + 6a1badb commit c73a3f7
Show file tree
Hide file tree
Showing 67 changed files with 508 additions and 26 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
cards
queryCardsfromProject: anotherString
queryCardsfromProject: aString

"aString => Column ID"
"anotherString => Project ID"
"aString => Project ID"
| data response |
data := (self getQueryColumnQuery: anotherString) parseAsJson.
data := (self getQueryColumnQuery: aString) parseAsJson.
response := self postRequestwithData: data.
^ (((response at: 'data') at: 'node') at: 'items') at: 'nodes'.

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"moveCard:toColumn:fieldId:inProject:" : "FP 6/19/2024 17:15",
"postRequestToURL:withData:" : "FP 6/13/2024 18:08",
"postRequestwithData:" : "FP 6/16/2024 14:08",
"queryCardsfromProject:" : "FP 6/17/2024 17:25",
"queryCardsfromProject:" : "FP 7/11/2024 12:14",
"queryColumnFieldId:" : "FP 6/19/2024 17:30",
"queryColumns:" : "FP 6/19/2024 17:36",
"queryProject:" : "FP 6/16/2024 15:40",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
labels
addLabel: aSPBLabel toDraft: aSPBCard

"this is for testing"
(aSPBLabel = #test) ifTrue: [^ true].
UIManager inform: 'Drafts/Notes do not have Labels'.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
columns
createColumn: aString


"this is for testing"
(aString = #test) ifTrue: [^ true].
"AFAIK, this is currently not supported by the API"
UIManager inform: 'Sorry, It is not possible to create a column from Squello.'.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
cards
createNewCard: aDictionary into: anSPBColumn

"this is for testing"
(aDictionary at: 'test') ifNotNil: [^ true].
UIManager inform: 'Squello does not support adding cards yet'.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
labels
deleteLabel: aSPBLabel fromDraft: aSPBCard

"this is for testing"
(aSPBLabel = #test) ifTrue: [^ true].
UIManager inform: 'Drafts/Notes do not have labels'.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ fetchCardsIntoColumns: anOrderedCollection

|cardsJson columnDict |
cardsJson := (self api queryCardsfromProject: self projectId) asOrderedCollection.
columnDict := (anOrderedCollection collect: [:each| each id -> each]) asDictionary.
columnDict := (anOrderedCollection collect: [:each| each id -> each]) as: Dictionary.

cardsJson do: [:each| SPBCard buildFromRemoteProject: each intoColumns: columnDict].
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
columns
cards
moveCard: aSPBCard after: anotherSPBCard toColumn: aSPBColumn

self moveCard: aSPBCard toColumn: aSPBColumn.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
columns
cards
moveCardToTop: aSPBCard toColumn: aSPBColumn

self moveCard: aSPBCard toColumn: aSPBColumn.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
columns
moveColumn: anSPBColumn after: anotherSPBColumn
moveColumn: aSPBColumn after: anotherSPBColumn

"this is for testing"
(aSPBColumn = #test) ifTrue: [^ true].
UIManager inform: 'Squello does not currently support moving Columns'.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
columns
moveColumnToFront: aSPBColumn

"this is for testing"
(aSPBColumn = #test) ifTrue: [^ true].
UIManager inform: 'Squello does not currently support moving Columns'.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
columns
renameColumn: anSPBColumn to: aString
renameColumn: aSPBColumn to: aString

"this is for testing"
(aSPBColumn = #test) ifTrue: [^ true].
"AFAIK, this is currently not supported by the API"
UIManager inform: 'Sorry, It is not possible to rename a column from Squello.'.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ updateCard: aSPBCard

aSPBCard isNote
ifTrue: [
self api updateDraft: aSPBCard.
^ self api updateDraft: aSPBCard.
]
ifFalse: [
self api updateIssue: aSPBCard.
^ self api updateIssue: aSPBCard.
].
Original file line number Diff line number Diff line change
Expand Up @@ -6,40 +6,40 @@
"addAssignee:toDraft:" : "FP 6/19/2024 16:55",
"addAssignee:toIssue:" : "FP 6/19/2024 16:55",
"addLabel:toCard:" : "FP 6/18/2024 13:45",
"addLabel:toDraft:" : "FP 6/18/2024 13:46",
"addLabel:toDraft:" : "FP 7/11/2024 13:11",
"addLabel:toIssue:" : "FP 6/19/2024 16:55",
"api" : "FP 6/15/2024 14:04",
"boardNr" : "FP 6/15/2024 13:22",
"boardNr:" : "FP 6/15/2024 13:22",
"columnFieldId" : "FP 6/19/2024 17:17",
"columnFieldId:" : "FP 6/19/2024 17:17",
"createCardsFromColumn:" : "FP 6/19/2024 18:30",
"createColumn:" : "FP 6/19/2024 16:40",
"createNewCard:into:" : "FP 6/19/2024 18:46",
"createColumn:" : "FP 7/11/2024 12:50",
"createNewCard:into:" : "FP 7/11/2024 12:08",
"deleteAssignee:fromCard:" : "FP 6/18/2024 11:38",
"deleteAssignee:fromDraft:" : "FP 6/19/2024 16:55",
"deleteAssignee:fromIssue:" : "FP 6/19/2024 16:54",
"deleteLabel:fromCard:" : "FP 6/18/2024 13:41",
"deleteLabel:fromDraft:" : "FP 6/18/2024 13:44",
"deleteLabel:fromDraft:" : "FP 7/11/2024 13:11",
"deleteLabel:fromIssue:" : "FP 6/19/2024 16:54",
"fetchCardsIntoColumns:" : "FP 6/17/2024 17:20",
"fetchCardsIntoColumns:" : "FP 7/11/2024 13:23",
"getAssigneeString:" : "FP 6/18/2024 12:03",
"getProjectId:user:" : "FP 6/15/2024 13:38",
"listPossibleAssignees" : "FP 6/16/2024 17:44",
"listPossibleLabels" : "FP 6/16/2024 17:52",
"moveCard:after:toColumn:" : "FP 6/19/2024 18:18",
"moveCard:toColumn:" : "FP 6/19/2024 18:16",
"moveCardToTop:toColumn:" : "FP 6/19/2024 18:23",
"moveColumn:after:" : "FP 6/19/2024 18:45",
"moveColumnToFront:" : "FP 6/19/2024 18:45",
"moveColumn:after:" : "FP 7/11/2024 12:53",
"moveColumnToFront:" : "FP 7/11/2024 12:53",
"parseInputBoardUrl:" : "FP 6/15/2024 13:30",
"projectId" : "FP 6/15/2024 13:22",
"projectId:" : "FP 6/15/2024 13:22",
"queryBoardName" : "FP 6/16/2024 15:39",
"queryColumnFieldId" : "FP 6/19/2024 17:31",
"queryColumns" : "FP 6/19/2024 17:34",
"renameColumn:to:" : "FP 6/19/2024 16:42",
"renameColumn:to:" : "FP 7/11/2024 12:59",
"repo" : "FP 6/17/2024 18:06",
"updateCard:" : "FP 6/18/2024 14:54",
"updateCard:" : "FP 7/11/2024 12:48",
"url" : "FP 6/17/2024 18:09",
"urlString" : "FP 6/17/2024 18:08" } }
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
assignees
addAssignee: aString toIssue: anotherString

"this is not the actual response, just for testing the execution path"
^ ('{"type":"issue", "action":"add_assignee", "id": "', aString, '"}') parseAsJson.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
labels
addLabel: aString toIssue: anotherString

"this is not the actual response, just for testing the execution path"
^ ('{"type":"issue", "action":"add_label", "id": "', aString, '"}') parseAsJson.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
assignees
deleteAssignee: aString fromIssue: anotherString

"this is not the actual response, just for testing the execution path"
^ ('{"type":"issue", "action":"delete_assignee", "id": "', aString, '"}') parseAsJson.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
labels
deleteLabel: aString fromIssue: anotherString

"this is not the actual response, just for testing the execution path"
^ ('{"type":"issue", "action":"delete_label", "id": "', aString, '"}') parseAsJson.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
assignees
listPossibleAssigneesForProject: aString

^ '[
{
"login": "fish",
"id": "42"
},
{
"login":"cat",
"id":"69"
}
]' parseAsJson.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
labels
listPossibleLabelsForProject: aString

^ '[
{
"name": "yummy",
"id": "1234",
"color":"00FF00"
},
{
"name":"goo",
"id":"4321",
"color":"FF0000"
}
]' parseAsJson.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cards
moveCard: aString toColumn: anotherString fieldId: aThirdString inProject: aForthString

"not actual response, just for testing"
^ 'moved ' , aString, ' to ', anotherString.
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
cards
queryCardsfromProject: aString

^ '[
{
"id": "1",
"type": "ISSUE",
"content": {
"title": "card 1",
"body": "card 1 body",
"assignees": {
"nodes": []
},
"labels": {
"nodes": []
},
"closed": true,
"id": "11"
},
"fieldValueByName": {
"name": "Todo",
"optionId": "60"
}
},
{
"id": "2",
"type": "DRAFT_ISSUE",
"content": {
"title": "card 2",
"body": "card 2 body",
"assignees": {
"nodes": []
},
"id": "12"
},
"fieldValueByName": {
"name": "Done",
"optionId": "61"
}
},
{
"id": "3",
"type": "ISSUE",
"content": {
"title": "card 3",
"body": "card 3 body",
"assignees": {
"nodes": []
},
"labels": {
"nodes": []
},
"closed": false,
"id": "13"
},
"fieldValueByName": {
"name": "Todo",
"optionId": "60"
}
}
]' parseAsJson.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
cards
queryColumnFieldId: aString

^ 'Status'.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
cards
queryColumns: aString

^ '[
{
"id": "1",
"name": "Todo"
},
{
"id": "2",
"name": "In Progress"
},
{
"id": "3",
"name": "Done"
}
]' parseAsJson.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
project
queryProject: aString

^ '{ "title": "THE PROJECT" }' parseAsJson.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
project
queryProjectID: aNumber user: aString

^ '69'.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
assignees
updateAssignees: aString fromDraft: anotherString

"this is not the actual response, just for testing the execution path"
^ ('{"type":"draft", "action":"update_assignees","ids":"', aString, ' "}') parseAsJson.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cards
updateCardPosition: aString after: anotherString inProject: aThridString

"not the actual response, this is for testing only"
^ 'moved ' , aString, ' after ', anotherString.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cards
updateDraft: aSPBCard

"not an actual response, just for testing"
^ 'updated draft ', aSPBCard id.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cards
updateIssue: aSPBCard

"not an actual response, just for testing"
^ 'updated issue ', aSPBCard id.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"class" : {
},
"instance" : {
"addAssignee:toIssue:" : "FP 7/11/2024 13:06",
"addLabel:toIssue:" : "FP 7/11/2024 13:06",
"deleteAssignee:fromIssue:" : "FP 7/11/2024 13:06",
"deleteLabel:fromIssue:" : "FP 7/11/2024 13:08",
"listPossibleAssigneesForProject:" : "FP 7/9/2024 11:31",
"listPossibleLabelsForProject:" : "FP 7/9/2024 11:50",
"moveCard:toColumn:fieldId:inProject:" : "FP 7/11/2024 12:42",
"queryCardsfromProject:" : "FP 7/11/2024 12:22",
"queryColumnFieldId:" : "FP 7/11/2024 12:54",
"queryColumns:" : "FP 7/11/2024 12:57",
"queryProject:" : "FP 7/9/2024 11:52",
"queryProjectID:user:" : "FP 7/11/2024 13:03",
"updateAssignees:fromDraft:" : "FP 7/11/2024 13:07",
"updateCardPosition:after:inProject:" : "FP 7/11/2024 12:38",
"updateDraft:" : "FP 7/11/2024 12:46",
"updateIssue:" : "FP 7/11/2024 12:49" } }
14 changes: 14 additions & 0 deletions Squello-Tests.package/SPBMockNewGithubAPI.class/properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"category" : "Squello-Tests",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "",
"instvars" : [
],
"name" : "SPBMockNewGithubAPI",
"pools" : [
],
"super" : "Object",
"type" : "normal" }
Empty file.
Loading

0 comments on commit c73a3f7

Please sign in to comment.