-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detect whether action view branch was deleted #32764
Detect whether action view branch was deleted #32764
Conversation
Done in 890863f |
routers/web/repo/actions/actions.go
Outdated
if refName.IsBranch() { | ||
branchName := refName.ShortName() | ||
run.IsRefDeleted = true // assume it's deleted then if it's found in the database it's not deleted | ||
branchRuns[branchName] = append(branchRuns[branchName], run) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it right? What if a branch starts 2 runs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And since the logic seems fragile, I think it needs tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it right? What if a branch starts 2 runs?
A branch could start multiple runs, feature branches maybe updated multiple times and main branches may merge many commits. All these behaviours will trigger action runs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
de6160a
…/gitea into lunny/detect_action_branch_deleted
* giteaofficial/main: Fix bug of branch/tag selector in the issue sidebar (go-gitea#32744) Fix lfs migration (go-gitea#32812) Avoid MacOS keychain dialog in integration tests (go-gitea#32813) Update actionlint.yaml Detect whether action view branch was deleted (go-gitea#32764) Add "n commits" link to contributors in contributors graph page (go-gitea#32799) Fix "unicode escape" JS error (go-gitea#32806) use dedicated runners for release artifacts (go-gitea#32811) Make API "compare" accept commit IDs (go-gitea#32801) Implement update branch API (go-gitea#32433) Fix JS error when dropping a file to a editor without dropzone (go-gitea#32804) chore: use errors.New to replace fmt.Errorf with no parameters (go-gitea#32800)
Fix #32761