Investigate current branch authorship model #3104
Zak Siddiqui opened 2 days ago

Check how branches track their "author" currently in OneDev server codebase

  • Service Desk commented 2 days ago

    Investigation result: OneDev does not currently persist an author or creator on a branch.

    • Branches are read directly from refs/heads/*. RefFacade retains the ref name and its pointed/peeled Git objects, with no user field.
    • The contributor shown on the branches page is derived from the tip commit author and committer. It is commit identity, not branch creator identity, and can change whenever the branch advances.
    • RefUpdated carries a nullable user for update-time processing. The receive hook supplies the authenticated pusher for Git pushes, while GitService.createBranch(...) emits the event without a user; an issue-linked branch-created event then falls back to the system user. In all cases this actor is event context, not metadata attached to the branch.

    So there is currently no reliable way to retrieve a stable branch author/creator after the fact. Supporting that concept would require persistent branch metadata or a durable audit record, plus defined behavior for Git pushes, UI/API/build-step creation, deletion, and recreation.

  • Service Desk changed state to 'Closed' 2 days ago
    Previous Value Current Value
    Open
    Closed
1/1
Type
Question
Priority
Normal
Assignee
Labels
No labels
Issue Votes (0)
Watchers (3)
Reference
OD-3104
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover