Fix pull request builds being pushed to users

This commit is contained in:
FooIbar committed 2023-11-21 17:17:07 +08:00
1 parent 8dc3b1f376
commit c3c7e88c15
1 file changed
+1 -1
@@ -34,7 +34,7 @@ object AppUpdater {
val branch = ghRequest(API_URL).execute {
JSONObject(body.string()).getString("default_branch")
}
val workflowRunsUrl = "$API_URL/actions/workflows/ci.yml/runs?branch=$branch&status=success&per_page=1"
val workflowRunsUrl = "$API_URL/actions/workflows/ci.yml/runs?branch=$branch&event=push&status=success&per_page=1"
val workflowRun = ghRequest(workflowRunsUrl).executeAndParseAs<GithubWorkflowRuns>().workflowRuns[0]
val shortSha = workflowRun.headSha.take(7)
if (shortSha != curSha) {