Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pagelen and sort as parameters to GetRepositoryPipelinesAsync #20

Open
gjhommersom opened this issue May 6, 2021 · 2 comments
Open

Comments

@gjhommersom
Copy link

For the biggest part of the project I'm using this library to fetch data. But for fetching pipeline data I have had to implement the request myself. I had to do this because the current implementation returns the 10 oldest pipelines but I want to get the newest pipelines. This can be achieved by adding &sort=-created_on to the request url.

These options are not documented but they were found by checking the http request done by Atlassians own API. There are a few more filter options available such as branch name but I have no interest in them.

Example request URL:

?fields=%2Bvalues.target.commit.message%2C%2Bvalues.target.commit.summary.html%2C%2Bvalues.target.%2A%2C%2Bvalues.%2A%2C%2Bpage%2C%2Bsize
&page=1
&pagelen=20
&sort=-created_on
&status=FAILED
&target.branch=master
&trigger_type=PUSH

Official API: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/pipelines/#get

If you are ok with adding (some of) these options I can create a pull request to implement it.

@lvermeulen
Copy link
Owner

Hi @gjhommersom , yes I would welcome a pull request for this.

@AuroraDysis
Copy link

In fact, many api support pagelen. Even if it does not appear in the document.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants