diff --git a/packages/AutoTDD-Exceptions.package/ATDDAccessDeniedError.class/class/rateLimitMessage.st b/packages/AutoTDD-Exceptions.package/ATDDAccessDeniedError.class/class/rateLimitMessage.st new file mode 100644 index 00000000..05b867e8 --- /dev/null +++ b/packages/AutoTDD-Exceptions.package/ATDDAccessDeniedError.class/class/rateLimitMessage.st @@ -0,0 +1,4 @@ +accessing +rateLimitMessage + + ^ 'You have been rate-limited. This GitHub Action will now be paused. Consider providing a token to prevent this.' \ No newline at end of file diff --git a/packages/AutoTDD-Exceptions.package/ATDDAccessDeniedError.class/methodProperties.json b/packages/AutoTDD-Exceptions.package/ATDDAccessDeniedError.class/methodProperties.json index a5e2ba8e..e4753196 100644 --- a/packages/AutoTDD-Exceptions.package/ATDDAccessDeniedError.class/methodProperties.json +++ b/packages/AutoTDD-Exceptions.package/ATDDAccessDeniedError.class/methodProperties.json @@ -1,5 +1,6 @@ { "class" : { - "message" : "ng 6/18/2021 13:55" }, + "message" : "ng 6/18/2021 13:55", + "rateLimitMessage" : "BF 6/18/2021 14:51" }, "instance" : { "defaultAction" : "ng 6/18/2021 13:53" } } diff --git a/packages/AutoTDD-GUI.package/ATDDBrowser.class/instance/refreshGitHubAction..st b/packages/AutoTDD-GUI.package/ATDDBrowser.class/instance/refreshGitHubAction..st index 75b4d466..313bbe06 100644 --- a/packages/AutoTDD-GUI.package/ATDDBrowser.class/instance/refreshGitHubAction..st +++ b/packages/AutoTDD-GUI.package/ATDDBrowser.class/instance/refreshGitHubAction..st @@ -1,4 +1,9 @@ action refreshGitHubAction: aGitHubAction - aGitHubAction refresh \ No newline at end of file + [ aGitHubAction refresh ] + on: ATDDAccessDeniedError + do: [ + UIManager default inform: ATDDAccessDeniedError rateLimitMessage. + self pauseTestingEntity: aGitHubAction + ] \ No newline at end of file diff --git a/packages/AutoTDD-GUI.package/ATDDBrowser.class/instance/resumeGitHubAction..st b/packages/AutoTDD-GUI.package/ATDDBrowser.class/instance/resumeGitHubAction..st index d43946d4..054931d9 100644 --- a/packages/AutoTDD-GUI.package/ATDDBrowser.class/instance/resumeGitHubAction..st +++ b/packages/AutoTDD-GUI.package/ATDDBrowser.class/instance/resumeGitHubAction..st @@ -3,4 +3,7 @@ resumeGitHubAction: aGitHubAction [ aGitHubAction resume ] on: ATDDAccessDeniedError - do: [UIManager default inform: 'test' ] \ No newline at end of file + do: [ + UIManager default inform: ATDDAccessDeniedError rateLimitMessage. + self pauseTestingEntity: aGitHubAction + ] \ No newline at end of file diff --git a/packages/AutoTDD-GUI.package/ATDDBrowser.class/methodProperties.json b/packages/AutoTDD-GUI.package/ATDDBrowser.class/methodProperties.json index 1ab51ff2..ec51c991 100644 --- a/packages/AutoTDD-GUI.package/ATDDBrowser.class/methodProperties.json +++ b/packages/AutoTDD-GUI.package/ATDDBrowser.class/methodProperties.json @@ -79,7 +79,7 @@ "pauseTestingEntity:" : "sw 5/28/2021 15:17", "pauseTravisStatuses" : "sw 5/26/2021 00:03", "pauseWatchers" : "sw 5/26/2021 00:04", - "refreshGitHubAction:" : "sw 5/21/2021 21:01", + "refreshGitHubAction:" : "BF 6/18/2021 14:51", "refreshSelectedGitHubActions" : "sw 5/21/2021 21:02", "refreshSelectedTravisStatuses" : "swi 7/10/2019 14:03", "refreshTravisStatus:" : "swi 7/10/2019 14:03", @@ -93,7 +93,7 @@ "resultsTravisStatuses" : "sw 5/26/2021 00:07", "resultsWatchers" : "sw 5/26/2021 00:07", "resumeAll" : "sw 5/21/2021 21:05", - "resumeGitHubAction:" : "ng 6/18/2021 15:03", + "resumeGitHubAction:" : "BF 6/18/2021 14:51", "resumeSelectedGitHubActions" : "sw 5/21/2021 22:17", "resumeSelectedTravisStatuses" : "swi 7/25/2019 15:30", "resumeSelectedWatchers" : "swi 7/25/2019 15:31", diff --git a/packages/AutoTDD-GUI.package/ATDDGitHubActionEditor.class/instance/applyChanges.st b/packages/AutoTDD-GUI.package/ATDDGitHubActionEditor.class/instance/applyChanges.st index d96ebfa0..f22dd803 100644 --- a/packages/AutoTDD-GUI.package/ATDDGitHubActionEditor.class/instance/applyChanges.st +++ b/packages/AutoTDD-GUI.package/ATDDGitHubActionEditor.class/instance/applyChanges.st @@ -3,4 +3,6 @@ applyChanges super applyChanges. - self gitHubAction resume \ No newline at end of file + [ self gitHubAction resume ] + on: ATDDAccessDeniedError + do: [ self gitHubAction pause ] \ No newline at end of file diff --git a/packages/AutoTDD-GUI.package/ATDDGitHubActionEditor.class/instance/hasValidUrl.st b/packages/AutoTDD-GUI.package/ATDDGitHubActionEditor.class/instance/hasValidUrl.st index a96e4f2a..36825b77 100644 --- a/packages/AutoTDD-GUI.package/ATDDGitHubActionEditor.class/instance/hasValidUrl.st +++ b/packages/AutoTDD-GUI.package/ATDDGitHubActionEditor.class/instance/hasValidUrl.st @@ -6,7 +6,10 @@ hasValidUrl client := ATDDGitHubActionsClient new. client token: self token. [ client requestOn: 'repos/' , self repositoryUrl ] + on: ATDDAccessDeniedError + do: [ UIManager default inform: ATDDAccessDeniedError rateLimitMessage. ] on: ATDDNotFoundError do: [ ^ false ]. - ^ true \ No newline at end of file + ^ true + diff --git a/packages/AutoTDD-GUI.package/ATDDGitHubActionEditor.class/methodProperties.json b/packages/AutoTDD-GUI.package/ATDDGitHubActionEditor.class/methodProperties.json index 06e5b757..472eee92 100644 --- a/packages/AutoTDD-GUI.package/ATDDGitHubActionEditor.class/methodProperties.json +++ b/packages/AutoTDD-GUI.package/ATDDGitHubActionEditor.class/methodProperties.json @@ -10,7 +10,7 @@ "tokenHelpLabel" : "sw 5/25/2021 20:51", "validSlug" : "BF 5/21/2021 14:07" }, "instance" : { - "applyChanges" : "sw 5/25/2021 20:21", + "applyChanges" : "BF 6/18/2021 14:54", "gitHubAction" : "sw 5/25/2021 19:21", - "hasValidUrl" : "ng 6/18/2021 14:52", + "hasValidUrl" : "BF 6/18/2021 14:52", "save" : "ng 6/18/2021 14:53" } } diff --git a/packages/AutoTDD-GUI.package/ATDDGitHubActionResults.class/instance/updateJobs.st b/packages/AutoTDD-GUI.package/ATDDGitHubActionResults.class/instance/updateJobs.st index 668761d3..4888242a 100644 --- a/packages/AutoTDD-GUI.package/ATDDGitHubActionResults.class/instance/updateJobs.st +++ b/packages/AutoTDD-GUI.package/ATDDGitHubActionResults.class/instance/updateJobs.st @@ -4,7 +4,7 @@ updateJobs | id jobs | id := self parser parseIdOfWorkflowAt: self selectedHistory ofWorkflowsOfRepository: self data repositoryJson. - jobs := self parser parseJobsOf: ( self data client getJsonForJobsForRepository: (self data repository , '/') forWorkflowRunId: id ). + jobs := self parser parseJobsOf: (self data client getJsonForJobsForRepository: (self data repository , '/') forWorkflowRunId: id). self jobs: (jobs collect: [ :job | ATDDGitHubActionWorkflowJob newForId: (parser primitiveParseIdOf: job) name: (parser primitiveParseNameOf: job) diff --git a/packages/AutoTDD-GUI.package/ATDDGitHubActionResults.class/methodProperties.json b/packages/AutoTDD-GUI.package/ATDDGitHubActionResults.class/methodProperties.json index 759f3c0c..b8071505 100644 --- a/packages/AutoTDD-GUI.package/ATDDGitHubActionResults.class/methodProperties.json +++ b/packages/AutoTDD-GUI.package/ATDDGitHubActionResults.class/methodProperties.json @@ -16,4 +16,4 @@ "parseSmalltalkCILog:" : "BF 6/11/2021 19:48", "selectedJob:" : "ng 5/26/2021 14:54", "updateJobLogForId:" : "ng 6/18/2021 14:43", - "updateJobs" : "ClassTest 5/29/2021 19:12" } } + "updateJobs" : "BF 6/18/2021 14:41" } }