-
I traced this through the core model and Git event flow.
There is no persistent
Branchentity/table in OneDev. A branch is represented by a Git ref (refs/heads/<name>), exposed at runtime asRefFacade.RefFacadecontains the ref name plus the referenced/peeled Git objects; it has no creator, owner, or author field.Project.getBranchRefs()obtains these refs fromGitService.The author information shown on the Branches page is the author of the current tip commit, not the user who created the branch. The page reads the tip
RevCommitand displays its Git author and, when different, committer. A Git identity is linked to a OneDev user only when its email matches one of that user’s verified email addresses. Commit queries such asauthored by meuse the same verified-email association.The authenticated actor who pushes a ref can be attached to the transient
RefUpdatedevent. Receive-hook updates populate it from the authenticated OneDev user, and branch-update triggers use that value for “pushed by” matching. However, this is event context rather than durable branch metadata, and some internalcreateBranchpaths emit the event without a user. Issue-named branch creation converts that event into anIssueBranchCreatedevent and falls back to the system user when the actor is absent.So the current model cannot reliably answer “who created/owns this branch” after creation. It can answer who authored/committed the tip commit, and event consumers can sometimes know who performed a particular ref update. Durable branch authorship would require separately persisted branch metadata or an audit record keyed by project and full ref name.
-
Previous Value Current Value Open
Closed
| Type |
Question
|
| Priority |
Normal
|
| Assignee | |
| Labels |
No labels
|
Look at the core model for Branch in onedev/server to understand current authorship tracking