I was wondering if there is a way to determine who created a branch in Stash? Is it even in the logs somewhere on the server?
Hi again Thomas,
Unfortunately Stash won't log branches created or deleted via the UI at the moment. But that seems like a very reasonable feature request. I'd raise an issue in the Stash project at https://jira.atlassian.com to get this implemented.
cheers,
Tim
Okay, I gave this a try. I see the log happening when I do a push from my client to the server, but what if I utilize the create branch feature directly in Stash itself? I don't see a log happening for that scenario.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas,
If you set the audit.highest.priority.to.log property in your stash-config.properties file to LOW you'll start seeing RepositoryPushEvent entries showing up in your STASH_HOME/log/audit logs. A delete will show a branch ref being updated to the value 0000000000000000000000000000000000000000 (which is the Git SHA equivalent of a null pointer). For example, here's me deleting a branch from the ~admin/ac-test personal repository:
0:0:0:0:0:0:0:1 | RepositoryPushEvent | admin | 1407789777956 | ~ADMIN/ac-test | [{"ref":"refs/heads/guilt-experiment","from":"b20469c9cc95305b24c229d64d2f11aa516bc975","to":"0000000000000000000000000000000000000000"}] | 822x103x0 | cxjlk0
This shows that the user "admin" deleted the branch "guilt-experiment" from the repository "~admin/ac-test" at 1407789777956 milliseconds past epoch.
You can find a full list of Stash audit log events here: https://confluence.atlassian.com/display/STASH/Audit+events+in+Stash
cheers,
Tim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, I misread your question as "who deleted a branch". A branch creation would look the same as above except the "from" field will show the value "0000000000000000000000000000000000000000" and the "to" field will show the SHA of the branch's head commit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.