HI, I try to tidy up the branches in our system. ...
# pact-broker
r
HI, I try to tidy up the branches in our system. For that I would need to get a list of all the branches associated with a pacticipant. So far I used the pact CLI together with docker
Copy code
docker run --rm \
      --env PACT_BROKER_BASE_URL=$PACT_BROKER_BASE_URL \
      --env PACT_BROKER_TOKEN=$PACTFLOW_TOKEN_READONLY \
      pactfoundation/pact-cli \
      broker <task>
unfortunately I cannot find a way to get a list of all the branches. I found a link to them in the
describe-pacticipant
command, but nothing for the CLI.
Copy code
"pb:branches": {
      "href": "<https://europace.pactflow.io/pacticipants/Ratenkredit-Leadtools-Backend/branches>"
    },
Anything I missed?
m
Yeah I don't know of a CLI for this, you'd need to use the API I think
It's probably a once off activity to clear out old ones. You should be able to clear out branches on demand as they get merged, which wouldn't need that call
r
yes that is true, but I wanna write a script as we have quite a few pacticipants 😅 I like the cli a lot, but if there isn't a command for that then - as you said - I have to use the API 🙂
m
If you're up for it, a PR to add the support would be welcome I'm sure