aboutsummaryrefslogtreecommitdiffstats
path: root/templates/swagger
diff options
context:
space:
mode:
authorcaicandong <50507092+CaiCandong@users.noreply.github.com>2023-07-26 16:52:07 +0800
committerGitHub <noreply@github.com>2023-07-26 08:52:07 +0000
commit13359581df51a25ff9f7492419206a9b6e2edbc4 (patch)
tree151e5a3513c64e6fdc9caaa62c4186583c08a2b3 /templates/swagger
parentdf9afe3aa8ccc1a91858bb8a2d4120cfb603e001 (diff)
downloadgitea-13359581df51a25ff9f7492419206a9b6e2edbc4.tar.gz
gitea-13359581df51a25ff9f7492419206a9b6e2edbc4.zip
refactor improve NoBetterThan (#26126)
- The `NoBetterThan` function can only handle comparisons between "pending," "success," "error," and "failure." For any other comparison, we directly return false. This prevents logic errors like the one in #26121. - The callers of the `NoBetterThan` function should also avoid making incomparable calls. --------- Co-authored-by: yp05327 <576951401@qq.com> Co-authored-by: puni9869 <80308335+puni9869@users.noreply.github.com>
Diffstat (limited to 'templates/swagger')
-rw-r--r--templates/swagger/v1_json.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index 7cb9bac95d..10ad8f555c 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -16514,7 +16514,7 @@
"x-go-package": "code.gitea.io/gitea/modules/structs"
},
"CommitStatusState": {
- "description": "CommitStatusState holds the state of a CommitStatus\nIt can be \"pending\", \"success\", \"error\", \"failure\", and \"warning\"",
+ "description": "CommitStatusState holds the state of a CommitStatus\nIt can be \"pending\", \"success\", \"error\" and \"failure\"",
"type": "string",
"x-go-package": "code.gitea.io/gitea/modules/structs"
},