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

Super minor lang edits #146

Merged
merged 1 commit into from
May 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/src/main/tut/activity.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import scalaj.http.HttpResponse
val accessToken = sys.env.get("GITHUB4S_ACCESS_TOKEN")
```

They also make use of `cats.Id` but any type container implementing `MonadError[M, Throwable]` will do.
They also make use of `cats.Id`, but any type container implementing `MonadError[M, Throwable]` will do.

Support for `cats.Id`, `cats.Eval` and `Future` (the only supported option for scala-js) are
Support for `cats.Id`, `cats.Eval`, and `Future` (the only supported option for scala-js) are
provided out of the box when importing `github4s.{js,jvm}.Implicits._`.

## Notifications
Expand All @@ -37,7 +37,7 @@ This lets you subscribe or unsubscribe from a conversation.

Unsubscribing from a conversation mutes all future notifications (until you comment or get @mentioned once more).

You can subscribe or unsubscribe using `setThreadSub`, it takes as arguments:
You can subscribe or unsubscribe using `setThreadSub`; it takes as arguments:

- `id`: Thread id from which you subscribe or unsubscribe.
- `subscribed`: Determines if notifications should be received from this thread.
Expand Down
8 changes: 4 additions & 4 deletions docs/src/main/tut/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ because if you are authenticating for the first time you don't have any access t

Used to request a new auth token given basic authentication.

You can create a new authorization token using `newAuth`, it takes as arguments:
You can create a new authorization token using `newAuth`; it takes as arguments:

- basic authentication for the token holder (`username` and `password`).
- `scopes`: attached to the token, for more information see [the scopes doc](https://developer.github.com/v3/oauth/#scopes).
Expand Down Expand Up @@ -62,7 +62,7 @@ See [the API doc](https://developer.github.com/v3/oauth_authorizations/#create-a

Generates an authorize url with a random state, both are returned within an [Authorize][auth-scala].

You can authorize a url using `authorizeUrl`, it takes as arguments:
You can authorize a url using `authorizeUrl`; it takes as arguments:

- `client_id`: the 20 character OAuth app client key for which to create the token.
- `redirect_uri`: the URL in your app where users will be sent to after authorization.
Expand All @@ -86,9 +86,9 @@ See [the API doc](https://developer.github.com/v3/oauth/#web-application-flow) f

### Get an access token

Requests an access token based on the code retrieved in the [Create a new authorization token](#create-a-new-authorization-token) step of the OAuth process
Requests an access token based on the code retrieved in the [Create a new authorization token](#create-a-new-authorization-token) step of the OAuth process.

You can get an access token using `getAccessToken`, it takes as arguments:
You can get an access token using `getAccessToken`; it takes as arguments:

- `client_id`: the 20 character OAuth app client key for which to create the token.
- `client_secret`: the 40 character OAuth app client secret for which to create the token.
Expand Down
17 changes: 8 additions & 9 deletions docs/src/main/tut/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ As an example, we'll assume that the endpoint listing the statuses for a specifi
the repository API is not part of Github4s and we want Github4s to support it. Documentation for
this endpoint can be found on [developer.github.com][api-doc].

This endpoint is fairly simple, we need to make a GET request with the repository's owner and name
as well as the ref for which we want the status in the URL's path and Github will send us back a
This endpoint is fairly simple; we need to make a GET request with the repository's owner and name
as well as the ref for which we want the status in the URL's path, and Github will send us back a
list of statuses.

## Source
Expand Down Expand Up @@ -78,7 +78,7 @@ case class Status(
```

We can put it in the [github4s.free.domain package][domain-pkg] in the file corresponding to the
API, here [Repository][repos-domain-scala].
API, here: [Repository][repos-domain-scala].

## API

Expand Down Expand Up @@ -129,7 +129,7 @@ class RepositoryOps[F[_]](implicit I: Inject[RepositoryOp, F]) {
```

This code belongs to the [github4s.free.algebra package][algebra-pkg] in the file corresponding
to the API, here [RepositoryOps][repos-algebra-scala].
to the API, here: [RepositoryOps][repos-algebra-scala].

## Interpreter

Expand Down Expand Up @@ -194,7 +194,7 @@ Now that we've written our source code, we're ready to write the tests.

## Token

The first step needed to run the tests is a valid token which we can provide through an
The first step we need to take in order to run the tests is a valid token which we can provide through an
environment variable:

```bash
Expand Down Expand Up @@ -232,8 +232,7 @@ it should "return an empty list when an invalid ref is provided" in {
}
```

Note however that integration tests are only required for GET endpoints (not POST or PATCH) in order
not to create any useless stuff on Github.
Be aware that integration tests are only required for GET endpoints (not POST or PATCH) to avoid creating useless stuff on GitHub.

## Unit tests

Expand Down Expand Up @@ -262,7 +261,7 @@ We're just verifying that our algebra gets the right parameters from our wrapper

### API spec

We're just checking that our API defined above hits the right endpoint, here
We're just checking that our API defined above hits the right endpoint, here:
`s"repos/$validRepoOwner/$validRepoName/commits/$validRefSingle/statuses"`:

```scala
Expand Down Expand Up @@ -387,7 +386,7 @@ See [the API doc](https://developer.github.com/v3/repos/statuses/#list-statuses-
for full reference.
```

Once the documentation is written we can build it locally with:
Once the documentation is written, we can build it locally with:

```bash
sbt makeMicrosite
Expand Down
6 changes: 3 additions & 3 deletions docs/src/main/tut/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title: Getting Started

## API token

In order to access the Github API you will need to have [an access token][access-token] with the
In order to access the Github API, you will need to have [an access token][access-token] with the
appropriate scopes (i.e. if you want to create gists, your token will need to have the gist scope).

## Github4s
Expand Down Expand Up @@ -50,14 +50,14 @@ val user1 = Github(accessToken).users.get("rafaparadela")
```

`user1` in this case is a `GHIO[GHResponse[User]]` which we can run (`foldMap`) with
`exec[M[_], C]` where `M[_]` represents any type container that implements
`exec[M[_], C]` where `M[_]` that represents any type container that implements
`MonadError[M, Throwable]` (for instance `cats.Eval`) and `C` represents a valid implementation of
an [HttpClient][http-client].

The previously mentioned implicit classes carry out of the box
instances for working with [scalaj][scalaj] (for JVM-compatible apps) and [roshttp][roshttp] (for
scala-js-compatible apps). Take into account that in the latter case, you can only use `Future` in
the place of `M[_]`.
place of `M[_]`.

A few examples follow with different `MonadError[M, Throwable]`.

Expand Down
4 changes: 2 additions & 2 deletions docs/src/main/tut/gist.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ val accessToken = sys.env.get("GITHUB4S_ACCESS_TOKEN")

They also make use of `cats.Id` but any type container implementing `MonadError[M, Throwable]` will do.

Support for `cats.Id`, `cats.Eval` and `Future` (the only supported option for scala-js) are
Support for `cats.Id`, `cats.Eval`, and `Future` (the only supported option for scala-js) are
provided out of the box when importing `github4s.{js,jvm}.Implicits._`.

## Create a gist

You can create a gist using `newGist`, it takes as arguments:
You can create a gist using `newGist`; it takes as arguments:

- the gist description.
- whether it is public or private.
Expand Down
22 changes: 11 additions & 11 deletions docs/src/main/tut/git_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ See [the API doc](https://developer.github.com/v3/git/refs/#get-a-reference) for
The ref must be formatted as `heads/branch`, not just `branch`.
For example, the call to get the data, the `master` branch will be `heads/master`.

You can create a reference using `createReference`, it takes as arguments:
You can create a reference using `createReference`; it takes as arguments:

- the repository coordinates (`owner` and `name` of the repository).
- `ref`: The name of the fully qualified reference (e.g.: `refs/heads/master`).
Expand All @@ -98,7 +98,7 @@ See [the API doc](https://developer.github.com/v3/git/refs/#create-a-reference)

### Update a Reference

You can update a reference using `updateReference`, it takes as arguments:
You can update a reference using `updateReference`; it takes as arguments:

- the repository coordinates (`owner` and `name` of the repository).
- `ref`: ref formatted as heads/branch.
Expand Down Expand Up @@ -127,7 +127,7 @@ See [the API doc](https://developer.github.com/v3/git/refs/#update-a-reference)

### Get a Commit

You can get a commit using `getCommit`, it takes as arguments:
You can get a commit using `getCommit`; it takes as arguments:

- the repository coordinates (`owner` and `name` of the repository).
- `sha`: the sha of the commit.
Expand All @@ -148,7 +148,7 @@ See [the API doc](https://developer.github.com/v3/git/commits/#get-a-commit) for

### Create a Commit

You can create a commit using `createCommit`, it takes as arguments:
You can create a commit using `createCommit`; it takes as arguments:

- the repository coordinates (`owner` and `name` of the repository).
- `message`: the new commit's message.
Expand Down Expand Up @@ -180,7 +180,7 @@ See [the API doc](https://developer.github.com/v3/git/commits/#create-a-commit)

### Create a Blob

You can create a blob using `createBlob`, it takes as arguments:
You can create a blob using `createBlob`; it takes as arguments:

- the repository coordinates (`owner` and `name` of the repository).
- `content`: the new blob's content.
Expand All @@ -203,10 +203,10 @@ See [the API doc](https://developer.github.com/v3/git/blobs/#create-a-blob) for

As you probably know, Git can be considered as a tree structure.
Each commit creates a new node in that tree.
We can even assume that all the Git commands or methods provided by the API,
We can even assume that all the Git commands or methods provided by the API
are just tools to navigate this tree and to manipulate it.

In the next sections, we'll see how Github4s provides methods to wrap the Git API.
In the following sections, we'll see how Github4s provides methods to wrap the Git API.

### Create a Tree

Expand All @@ -217,7 +217,7 @@ write out a new tree.
IMPORTANT: If you don't set ´baseTree´, the commit will be created on top of everything;
however, it will only contain your changes, the rest of your files will show up as deleted.

You can create a tree using `createTree`, it takes as arguments:
You can create a tree using `createTree`; it takes as arguments:

- the repository coordinates (`owner` and `name` of the repository).
- `baseTree`: the SHA1 of the tree you want to update with new data.
Expand All @@ -229,7 +229,7 @@ You can create a tree using `createTree`, it takes as arguments:
- `type`: Either blob, tree, or commit.
- `sha`: The SHA1 checksum ID of the object in the tree.
- `content`: The content you want this file to have.
GitHub will write this blob out and use that SHA for this entry. Use either this, or `tree.sha`.
GitHub will write this blob out and use that SHA for this entry. Use either this or `tree.sha`.

```scala
val createTree = Github(accessToken).gitData.createTree(
Expand Down Expand Up @@ -261,14 +261,14 @@ See [the API doc](https://developer.github.com/v3/git/trees/#create-a-tree) for

### Create a Tag

You can create a tag using `createTag`, it takes as arguments:
You can create a tag using `createTag`; it takes as arguments:

- the repository coordinates (`owner` and `name` of the repository).
- `tag`: the tag.
- `message`: the new tag message.
- `objectSha`: the SHA of the git object this is tagging.
- `objectType`: the type of the object we're tagging.
Normally this is a `commit` but it can also be a `tree` or a `blob`.
Normally this is a `commit`, but it can also be a `tree` or a `blob`.
- `tagger`: Optional object containing information about the individual creating the tag.

```scala
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/tut/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Github4s is a GitHub API wrapper written in Scala.

## Installation

Github4s is compatible with both Scala JVM and Scala.js. It supports 2.10, 2.11 and 2.12.
Github4s is compatible with both Scala JVM and Scala.js. It supports 2.10, 2.11, and 2.12.

To get started with SBT, simply add the following to your build.sbt file.

Expand Down
14 changes: 7 additions & 7 deletions docs/src/main/tut/issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ val accessToken = sys.env.get("GITHUB4S_ACCESS_TOKEN")

### Create an issue

You can create an issue using `createIssue`, it takes as arguments:
You can create an issue using `createIssue`; it takes as arguments:

- the repository coordinates (`owner` and `name` of the repository).
- the content of the issue (`title` and `body`).
Expand All @@ -60,7 +60,7 @@ See [the API doc](https://developer.github.com/v3/issues/#create-an-issue) for f

### Edit an issue

You can edit an existing issue using `editIssue`, it takes as arguments:
You can edit an existing issue using `editIssue`; it takes as arguments:

- the repository coordinates (`owner` and `name` of the repository).
- the issue `number`.
Expand Down Expand Up @@ -88,7 +88,7 @@ See [the API doc](https://developer.github.com/v3/issues/#edit-an-issue) for ful

### List issues

You can also list issues for a repository through `listIssues`, it take as arguments:
You can also list issues for a repository through `listIssues`; it take as arguments:

- the repository coordinates (`owner` and `name` of the repository).

Expand All @@ -112,7 +112,7 @@ for full reference.

### Search issues

Lastly, you can also search issues all across Github thanks to `searchIssues`, it takes as
Lastly, you can also search issues all across Github thanks to `searchIssues`; it takes as
arguments:

- a `query` string (the URL encoding is taken care of by Github4s).
Expand Down Expand Up @@ -144,7 +144,7 @@ See [the API doc](https://developer.github.com/v3/search/#search-issues) for ful

### Create a Comment

You can create a comment for an issue whit the following parameters:
You can create a comment for an issue with the following parameters:

- the repository coordinates (`owner` and `name` of the repository).
- `number`: The issue number.
Expand All @@ -167,7 +167,7 @@ See [the API doc](https://developer.github.com/v3/issues/comments/#create-a-comm

### Edit a Comment

You can edit a comment from an issue whit the following parameters:
You can edit a comment from an issue with the following parameters:

- the repository coordinates (`owner` and `name` of the repository).
- `id`: The comment id.
Expand All @@ -190,7 +190,7 @@ See [the API doc](https://developer.github.com/v3/issues/comments/#edit-a-commen

### Delete a Comment

You can delete a comment from an issue whit the following parameters:
You can delete a comment from an issue with the following parameters:

- the repository coordinates (`owner` and `name` of the repository).
- `id`: The comment id.
Expand Down
12 changes: 6 additions & 6 deletions docs/src/main/tut/pull_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ import scalaj.http.HttpResponse
val accessToken = sys.env.get("GITHUB4S_ACCESS_TOKEN")
```

They also make use of `cats.Id` but any type container implementing `MonadError[M, Throwable]` will do.
They also make use of `cats.Id`, but any type container implementing `MonadError[M, Throwable]` will do.

Support for `cats.Id`, `cats.Eval` and `Future` (the only supported option for scala-js) are
Support for `cats.Id`, `cats.Eval`, and `Future` (the only supported option for scala-js) are
provided out of the box when importing `github4s.{js,jvm}.Implicits._`.

## List pull requests

You can list the pull requests for a repository using `list`, it takes as arguments:
You can list the pull requests for a repository using `list`; it takes as arguments:

- the repository coordinates (`owner` and `name` of the repository).
- a list of [PRFilter](https://github.com/47deg/github4s/blob/master/github4s/shared/src/main/scala/github4s/free/domain/PullRequest.scala).
Expand All @@ -58,7 +58,7 @@ See [the API doc](https://developer.github.com/v3/pulls/#list-pull-requests) for

## List the files in a pull request

You can also list the files for a pull request using `listFiles`, it takes as arguments:
You can also list the files for a pull request using `listFiles`; it takes as arguments:

- the repository coordinates (`owner` and `name` of the repository).
- the pull request number.
Expand All @@ -80,9 +80,9 @@ See [the API doc](https://developer.github.com/v3/pulls/#list-pull-requests-file
reference.

## Create a pull request
If you want to create a pull request, there are two ways to create a pull request.
If you want to create a pull request, you can follow two different methods.

One the one hand, we can pass the following parameters:
On the one hand, we can pass the following parameters:

- the repository coordinates (`owner` and `name` of the repository).
- `title` (as part of the `NewPullRequestData` object): Title for the pull request.
Expand Down