Skip to content

Add FromPullRequest to GetDiffStat #282

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

Conversation

CescHolly
Copy link
Contributor

@CescHolly CescHolly commented Apr 18, 2024

Changes:

Added the additional fields:

  • from_pullrequest_id
  • topic

to GetDiffStat.

You can see that these fields are used when following a link from a fetched PullRequest (pullRequest.Links.DiffStat.Href).

Here's an example:

"diffstat": {
    "href": "https://api.bitbucket.org/2.0/repositories/OWNER/REPO_SLUG/diffstat/SPEC?from_pullrequest_id=2&topic=true"
}

In this case SPEC would take the format: REPO_SLUG:hash.

An alternative approach would be to add a GetDiffStat on the pullequest interface, and make it specifically for pull request diff stats. Let me know if you'd prefer that. I did it this way provisionally because it was the fastest, although it feels a bit hacky.

Copy link
Owner

@ktrysmt ktrysmt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you.

@ktrysmt ktrysmt merged commit 2fc2e79 into ktrysmt:master Apr 23, 2024
fernandoStrong pushed a commit to strong-network/go-bitbucket that referenced this pull request Oct 14, 2024
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

Successfully merging this pull request may close these issues.

2 participants