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

# Make body: Option[String] #200

Merged
merged 1 commit into from
Mar 10, 2018

Conversation

lloydmeta
Copy link
Contributor

You can create a PR with "body": null if you use the API, or use a tool
that uses the API.

This PR makes body: Option[String]

curl -X GET https://api.github.com/repos/lloydmeta/gh-test-repo/pulls
[
  {
    "url": "https://api.github.com/repos/lloydmeta/gh-test-repo/pulls/3",
    // snip
    "body": null,
    // snip
  },
  {
    "url": "https://api.github.com/repos/lloydmeta/gh-test-repo/pulls/1",
    // snip
    "body": "",
    // snip
]

You can create a PR with `"body": null` if you use the API, or use a tool
that uses the API.

```shell
curl -X GET https://api.github.com/repos/lloydmeta/gh-test-repo/pulls
[
  {
    "url": "https://api.github.com/repos/lloydmeta/gh-test-repo/pulls/3",
    // snip
    "body": null,
    // snip
  },
  {
    "url": "https://api.github.com/repos/lloydmeta/gh-test-repo/pulls/1",
    "id": 173714694,
    "html_url": "lloydmeta/gh-test-repo#1",
    "diff_url": "https://github.com/lloydmeta/gh-test-repo/pull/1.diff",
    "patch_url": "https://github.com/lloydmeta/gh-test-repo/pull/1.patch",
    "issue_url": "https://api.github.com/repos/lloydmeta/gh-test-repo/issues/1",
    // snip
    "body": "",
]
```
Copy link
Member

@juanpedromoreno juanpedromoreno left a comment

Choose a reason for hiding this comment

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

LGTM

Test passed locally 👍

Thanks @lloydmeta !

Copy link
Contributor

@BenFradet BenFradet left a comment

Choose a reason for hiding this comment

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

Merging thanks!

"PullRequests >> List" should "return a right response when a valid repo is provided but not all pull requests have body" in {
val response =
Github(accessToken).pullRequests
.list("lloydmeta", "gh-test-repo", List(PRFilterOpen))
Copy link
Contributor

Choose a reason for hiding this comment

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

I hope you're not planning on changing this anytime soon 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

LOL, yeah, I made that repo just so there would be zero chance of it changing :)

@BenFradet BenFradet merged commit 8db7bd4 into 47degrees:master Mar 10, 2018
@BenFradet
Copy link
Contributor

@lloydmeta do you need a release?

@lloydmeta
Copy link
Contributor Author

@BenFradet Yea, a release would be much appreciated.

Just for some context, I'm trying to build a tool that would allow me to run Scalafmt on files that aren't currently involved in any recent PRs and submit a PR for formatting. The idea being to unintrusively format a large codebase. I'm filing PRs to github4s as I make progress.

@BenFradet
Copy link
Contributor

interesting stuff, we'll release 0.18.3 👍

@lloydmeta lloydmeta deleted the feature/optional-body branch March 22, 2018 12:02
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.

3 participants