Access Branch data on differential

Hey there, so I’m curious is there any way to retrieve which branch a differential corresponds to? Having looked through conduit and ran some test queries I would assume no as the data didn’t present itself to me at all.

The closet I got was checking up a diff and looking at the branches for any attached tickets in the commit message/summary. However if the commit was merged into multiple branches that adds noise to my query where as for my purposes I need the original/feature branch the commits/diff are tied to and only that branch.

I could just have the user encode that in their summary but this feels like something that should be encoded if possible.

Client side, ‘arc feature’ or ‘arc branches’ should show which revision each local branch relates to.

Server-side, a Revision doesn’t have to be related to a branch. Branch information is displayed if available, under “Diff Detail” section.

Yeah thanks, realized it wasn’t showing up under my diff since my branch wasn’t commited to the remote.

It’s supposed to show the branch name that is local to you; the workflow does not expect you to push feature branches to remote.

Oh really? It only shows if a branch is pushed (which is technically the behavior I want. Writing a service to tie and approve diff’s based on branch builds/tests on my CI server)

Is there a config toggle for this, didn’t see anything when I was looking.

There’s no config for this, but sometimes the information isn’t there - e.g. when you run arc diff <commit hash>, arc might not pick a branch name. e.g. in the latest revision on secure-dot, there’s a branch name, and that branch was not pushed.

Using differential.query (frozen), you should be able to find revisions by commitHashes and/or branches. This conduit method isn’t very well documented, so you’ll need to dig into the code to figure out how to use it.