Detect whether action view branch was deleted - #32764
Merged
Merged
Conversation
metiftikci
reviewed
Dec 8, 2024
Contributor
Member
Author
Done in 890863f |
Zettat123
approved these changes
Dec 10, 2024
yp05327
reviewed
Dec 10, 2024
delvh
reviewed
Dec 11, 2024
delvh
approved these changes
Dec 11, 2024
wxiaoguang
reviewed
Dec 11, 2024
wxiaoguang
reviewed
Dec 11, 2024
wxiaoguang
reviewed
Dec 11, 2024
| 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) |
Contributor
There was a problem hiding this comment.
Is it right? What if a branch starts 2 runs?
Contributor
There was a problem hiding this comment.
And since the logic seems fragile, I think it needs tests
Member
Author
There was a problem hiding this comment.
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.
wxiaoguang
reviewed
Dec 11, 2024
…/gitea into lunny/detect_action_branch_deleted
lunny
enabled auto-merge (squash)
December 12, 2024 18:51
zjjhot
added a commit
to zjjhot/gitea
that referenced
this pull request
Dec 13, 2024
* 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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Fix #32761