Fix documentation: change all master branch references to main (#2220)

This commit is contained in:
Hannah Kiekens
2020-07-07 20:01:55 +02:00
committed by GitHub
parent 9a234930c9
commit 946b0872b7
4 changed files with 8 additions and 8 deletions

View File

@@ -1,8 +1,8 @@
### Creating new pull request from a fork ### Creating new pull request from a fork
**Scenario:** **Scenario:**
Creating a pull request from a fork/branch (head) and pulling into octokit.net/master (base) Creating a pull request from a fork/branch (head) and pulling into octokit.net/main (base)
When you are opening a PR against a repository within an organization, owner is the name of the organization When you are opening a PR against a repository within an organization, owner is the name of the organization
In this scenario as we are merging to octokit/octokit.net:master, owner=octokit In this scenario as we are merging to octokit/octokit.net:main, owner=octokit
```csharp ```csharp
public async Task CreatePullRequestFromFork() public async Task CreatePullRequestFromFork()
@@ -10,7 +10,7 @@ public async Task CreatePullRequestFromFork()
GitHubClient ghClient = new GitHubClient(new ProductHeaderValue("MyLib", "v2.0.0")); GitHubClient ghClient = new GitHubClient(new ProductHeaderValue("MyLib", "v2.0.0"));
ghClient.Credentials = new Credentials("apiToken"); ghClient.Credentials = new Credentials("apiToken");
NewPullRequest newPr = new NewPullRequest("PrTitle", "forkName:branchName", "master"); NewPullRequest newPr = new NewPullRequest("PrTitle", "forkName:branchName", "main");
var octokitRepo = await ghClient.Repository.Get("octokit", "ocktokit.net"); var octokitRepo = await ghClient.Repository.Get("octokit", "ocktokit.net");
var pullRequest = await ghClient.PullRequest.Create("octokit", "octokit.net", newPr); var pullRequest = await ghClient.PullRequest.Create("octokit", "octokit.net", newPr);

View File

@@ -28,7 +28,7 @@ var tokenAuth = new Credentials("token"); // NOTE: not real token
client.Credentials = tokenAuth; client.Credentials = tokenAuth;
``` ```
It is **strongly recommended** to use the [OAuth Flow](https://github.com/octokit/octokit.net/blob/master/docs/oauth-flow.md) for interactions on behalf of a user, as this gives two significant benefits: It is **strongly recommended** to use the [OAuth Flow](https://github.com/octokit/octokit.net/blob/main/docs/oauth-flow.md) for interactions on behalf of a user, as this gives two significant benefits:
- the application owner never needs to store a user's password - the application owner never needs to store a user's password
- the token can be revoked by the user at a later date - the token can be revoked by the user at a later date

View File

@@ -1,7 +1,7 @@
# Octokit.net # Octokit.net
If you are new to Octokit, I recommend reading the If you are new to Octokit, I recommend reading the
[Getting Started](https://github.com/octokit/octokit.net/blob/master/docs/getting-started.md) [Getting Started](https://github.com/octokit/octokit.net/blob/main/docs/getting-started.md)
guide, which walks through configuring the basics. guide, which walks through configuring the basics.
When you're done with that, have a look at the topics listed under **Features** to get When you're done with that, have a look at the topics listed under **Features** to get
@@ -13,6 +13,6 @@ There's also some advanced topics which require familiarity with the internals o
You shouldn't need to know these well, but they're there if there comes a day when you do. You shouldn't need to know these well, but they're there if there comes a day when you do.
If we still haven't covered a topic you're interested in, check out the suite of If we still haven't covered a topic you're interested in, check out the suite of
[integration tests](https://github.com/octokit/octokit.net/tree/master/Octokit.Tests.Integration/Clients) [integration tests](https://github.com/octokit/octokit.net/tree/main/Octokit.Tests.Integration/Clients)
which can help you to get familiar with how things currently work. Then open an issue which can help you to get familiar with how things currently work. Then open an issue
against the repository, so we can properly document things. against the repository, so we can properly document things.

View File

@@ -90,8 +90,8 @@ There's also a number of additional fields:
- `Labels` - a collection of labels to assign to the issue - `Labels` - a collection of labels to assign to the issue
Note that `Milestones` and `Labels` need to exist in the repository before Note that `Milestones` and `Labels` need to exist in the repository before
creating the issue. Refer to the [Milestones](https://github.com/octokit/octokit.net/blob/master/docs/milestones.md) creating the issue. Refer to the [Milestones](https://github.com/octokit/octokit.net/blob/main/docs/milestones.md)
and [Labels](https://github.com/octokit/octokit.net/blob/master/docs/labels.md) and [Labels](https://github.com/octokit/octokit.net/blob/main/docs/labels.md)
sections for more details. sections for more details.
### Update ### Update