I'm looking for a way to retrieve the name of the ...
# how-do-i
m
I'm looking for a way to retrieve the name of the parent branch in CI. Typically this is
github.event.pull_request.base.ref
, which evaluates to
[PARENT_BRANCH]
but when pushing with graphite it evaluates to
graphite-base/[PR_NUMBER]
. Is there another variable or technique to get the name of the parent (base) branch?
p
(If applicable) To help us more clearly understand what you're trying to do, please provide additional details about: - Screenshots / debug logs / list of commands you've tried to run so far - Your workflow - Current state
hey Michael, those
graphite-base/*
branches get created as part of Graphite's automatic rebasing. I think your script would need to try recursively look for the parent in the event one of them is returned as the
github.event.pull_request.base.ref