.devcontainer
.gitea
.github
assets
build
cmd
contrib
custom
docker
models
modules
actions
activitypub
analyze
assetfs
auth
avatar
badge
base
cache
cachegroup
charset
commitstatus
commit_status.go
commit_status_test.go
container
csv
dump
emoji
eventsource
fileicon
generate
git
gitrepo
globallock
graceful
gtprof
hcaptcha
highlight
hostmatcher
htmlutil
httpcache
httplib
indexer
issue
json
label
lfs
lfstransfer
log
markup
mcaptcha
metrics
migration
nosql
optional
options
packages
paginator
pprof
private
process
proxy
proxyprotocol
public
queue
recaptcha
references
regexplru
repository
reqctx
secret
session
setting
sitemap
ssh
storage
structs
svg
sync
system
tailmsg
tempdir
templates
test
testlogger
timeutil
translation
turnstile
typesniffer
updatechecker
uri
user
util
validation
web
webhook
zstd
options
public
routers
services
snap
templates
tests
tools
web_src
.air.toml
.changelog.yml
.dockerignore
.editorconfig
.envrc
.eslintrc.cjs
.gitattributes
.gitignore
.gitpod.yml
.golangci.yml
.ignore
.mailmap
.markdownlint.yaml
.npmrc
.spectral.yaml
.yamllint.yaml
BSDmakefile
CHANGELOG-archived.md
CHANGELOG.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
DCO
Dockerfile
Dockerfile.rootless
LICENSE
MAINTAINERS
Makefile
README.md
README.zh-cn.md
README.zh-tw.md
SECURITY.md
build.go
crowdin.yml
flake.lock
flake.nix
go.mod
go.sum
main.go
main_timezones.go
package-lock.json
package.json
playwright.config.ts
poetry.lock
poetry.toml
pyproject.toml
stylelint.config.js
tailwind.config.js
tsconfig.json
updates.config.js
vitest.config.ts
webpack.config.js

Extract from #34531 ## Move Commit status state to a standalone package Move the state from `structs` to `commitstatus` package. It also introduce `CommitStatusStates` so that the combine function could be used from UI and API logic. ## Combined commit status Changed This PR will follow Github's combined commit status. Before this PR, every commit status could be a combined one. According to https://docs.github.com/en/rest/commits/statuses?apiVersion=2022-11-28#get-the-combined-status-for-a-specific-reference > Additionally, a combined state is returned. The state is one of: > failure if any of the contexts report as error or failure > pending if there are no statuses or a context is pending > success if the latest status for all contexts is success This PR will follow that rule and remove the `NoBetterThan` logic. This also fixes the inconsistent between UI and API. In the API convert package, it has implemented this which is different from the UI. It also fixed the missing `URL` and `CommitURL` in the API. ## `CalcCommitStatus` return nil if there is no commit statuses The behavior of `CalcCommitStatus` is changed. If the parameter commit statuses is empty, it will return nil. The reference places should check the returned value themselves.