Manoj Kulkarni
Manoj Kulkarni

Reputation: 86

Get branches from bitbucket repository

I have used "gentlero/bitbucket-api" in php to get bitbucket information. https://github.com/gentlero/bitbucket-api

I want to get branches from bitbucket repository But unable to get branches information. Any help will be appreciated.

Upvotes: 2

Views: 222

Answers (1)

Dharmesh Rakholia
Dharmesh Rakholia

Reputation: 1238

you can get branch via followed code. try this code. hopefully help

    $result=Bitbucket::connection('alternative')->api('Repositories\Repository')->branches('repo name', 'api name');
    $data=json_decode($result->getContent());
    dd($data);

Upvotes: 1

Related Questions