-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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.
…/gitea into lunny/detect_action_branch_deleted
Fix #32761