From c4e6fcdbccc9a34e1b5c84e948edc34f2d9990d5 Mon Sep 17 00:00:00 2001 From: Nick Floyd <139819+nickfloyd@users.noreply.github.com> Date: Wed, 27 Apr 2022 14:49:19 -0500 Subject: [PATCH] Updates the repo docs with the current release workflow (#2438) * updates the repo docs with the current release workflow --- DEPLOYMENT.md | 66 ++- ReleaseNotes.md | 997 ------------------------------------------- docs/contributing.md | 20 +- mkdocs.yml | 2 +- 4 files changed, 72 insertions(+), 1013 deletions(-) delete mode 100644 ReleaseNotes.md diff --git a/DEPLOYMENT.md b/DEPLOYMENT.md index bc840297..1de4dc05 100644 --- a/DEPLOYMENT.md +++ b/DEPLOYMENT.md @@ -1,19 +1,59 @@ ## Deploying a new release -When we're ready to deploy a new release, we need to do the following steps: +### Requirements + +Creating a new release and deploying the package to nuget are administrative tasks and require that you have/do the following: +1. Admin access to the [GitHub](https://www.nuget.org/profiles/GitHub) NuGet organization +2. Admin rights to the [octokit.net](https://github.com/octokit/octokit.net) repository +3. For any PRs that should be noted in the release notes, each pull request must have a comment formatted like `release_notes: description` where description represents the details of the change. + +### Prepare the changeset & publish to nuget.org 1. Create a branch named `release`. -2. Update [`ReleaseNotes.md`](ReleaseNotes.md). Note that the format is -important as we parse the version out and use that for the NuGet packages. -3. Push the branch to GitHub and create a pull request. This will kick off the -MyGet build of the NuGet package with this new version. - If you're impatient, you can run `.\build CreatePackages` and get the packages locally. -4. Test! -5. When you're satisfied with this release, push the package -[from MyGet](https://www.myget.org/feed/Packages/octokit) to NuGet. -6. Create a tag `git tag v#.#.#`. For example, to create a tag for 1.0.0 +2. Push the branch to GitHub and create a pull request. This will kick off the CI builds to verify the changes. +3. Test! +4. [Generate](https://github.com/shiftkey/octokit.releasenotes) the release notes. `Octokit.ReleaseNotes generate v0.50.0 [BASE] [HEAD]` + Any PRs that should be noted in the release notes, each pull request must have a comment formatted like `release_notes: description` where description represents the details of the change. Make sure for the commit range any changeset in a PR that should be represented has a comment on the PR prefixed with `release_notes:` and corresponding label (details below) +5. When you're satisfied with this release, create a tag `git tag v#.#.#`. For example, to create a tag for 1.0.0 `git tag v1.0.0` -7. Push the tag to the server. `git push --tags` -8. Accept the pull request. +6. Push the tag to the server. `git push --tags` +7. When the tag is successfully pushed, the [publish workflow](https://github.com/octokit/octokit.net/blob/main/.github/workflows/publish.yml) will run and build and push the package to nuget +8. Verify that the package has been uploaded to [nuget.org](https://www.nuget.org/packages/Octokit/) +8. Accept the pull request 9. Create a [new release](https://github.com/octokit/octokit.net/releases/new) -using the tag you just created and pasting in the release notes you just wrote up +using the tag you just created and pasting in the release notes you just generated + +--- + +### Details on the release notes generator + +Release notes [generator](https://github.com/shiftkey/octokit.releasenotes): this is used to pull details using the GitHub API to generate the release notes. + +The generator helps in that it produces release notes that are consistently formatted based on information directly from the change scope (from the previous release to the current tip i.e. the `release` branch). + +The nuances are mostly around how it gets and parses release notes from the PRs found in the changeset. The following are the comment prefixes that the generator currently supports: + +* `release_notes` - Having this in the comment with a corresponding "category" label on the PR will put the given note under the "Release Notes" section of the output in the group for the given label +* `advisories` - Having this in the comment will put the given note into the "Advisories and Breaking Changes" section of the output + +In addition to formatted comment parsing, the generator also looks at the following labels to generate categories with in the release notes. + +* `category: bug` - This will add the comment in the PR prefixed with `release_notes` into the `Fixes` group +* `category: docs-and-samples` - This will add the comment in the PR prefixed with `release_notes` into the `Documentation Updates` group +* `category: feature` - This will add the comment in the PR prefixed with `release_notes` into the `Features/Enhancements` group +* `category: housekeeping` - This will add the comment in the PR prefixed with `release_notes` into the `Housekeeping` group + +When these labels are added to a given PR the generator will produce and categorize comment in the release notes formatted like: + +`Comment content` - `PR Id and link` via `Contributor` +ex. "Cleans up some mentions of `master` branch in codebase - [#2306](https://github.com/octokit/octokit.net/pull/2306) via [@shiftkey](https://github.com/shiftkey)" + +---- +### Troubleshooting + +When running the release notes generator on a mac if dotnet has not been added to the PATH or there is not alias defined in your dotfiles you'll need to execute the command as follows: + +`dotnet run generate [BASE] [HEAD]` +(where `[BASE]` is the last release label (i.e. v0.50.0) and `[HEAD]` represents the `release` branch tip that was generated above) + +The tool looks for a environment variable named `OCTOKIT_OAUTHTOKEN`. This token requires a minimal scope to execute and pull the data from the repository via API. Keep in mind that if a token is not provided then you will most likely run into rate limit errors because the requests are being made anonymously. diff --git a/ReleaseNotes.md b/ReleaseNotes.md deleted file mode 100644 index fbdb2f26..00000000 --- a/ReleaseNotes.md +++ /dev/null @@ -1,997 +0,0 @@ -### New in 0.32.0 (released 09/09/2018) - -## Advisories and Breaking Changes - -- Due to upstream breaking changes in the CheckRuns API, using check runs against github.com will require using the new/renamed fields on `CheckRunAnnotation` response and `NewCheckRunAnnotation` request models. However the old fields are maintained in octokit.net (marked as deprecated) to continue supporting GitHub Enterprise 2.14, which will not receive these changes. Users of GHE 2.14 should use the old fields, whilst users of github.com should update to use the new fields - -## Release Notes - -### Milestone: GitHub Apps - -**Features/Enhancements** - -- Adjust GitHub App Installation Access Token route in line with [announced API changes](https://developer.github.com/changes/2018-08-16-renaming-and-deprecation-of-github-app-installation-access-token-route/) - [#1860](https://github.com/octokit/octokit.net/pull/1860) via [@ryangribble](https://github.com/ryangribble) -- Implement additional endpoints for GitHub Apps to find installations for a given organization, repository or user - [#1854](https://github.com/octokit/octokit.net/pull/1854) via [@StanleyGoldman](https://github.com/StanleyGoldman), [@ryangribble](https://github.com/ryangribble) -- Implement GitHub Apps Installation API to allow listing all repositories a GitHub App Installation or GitHub App authenticated user has access to - [#1854](https://github.com/octokit/octokit.net/pull/1854) via [@StanleyGoldman](https://github.com/StanleyGoldman), [@ryangribble](https://github.com/ryangribble) -- Implement new/changed fields on `CheckRunAnnotation` response and `NewCheckRunAnnotation` request models - replace `Filename` with `Path`, `WarningLevel` with `AnnotationLevel` and add `StartColumn` and `EndColumn` - [#1857](https://github.com/octokit/octokit.net/pull/1857) via [@ryangribble](https://github.com/ryangribble) -- Add new method `CheckSuitesClient.Rerequest()` and mark the old `CheckSuitesClient.Request()` method as deprecated (this will no longer function on github.com but will continue to be supported on GitHub Enterprise 2.14) - [#1857](https://github.com/octokit/octokit.net/pull/1857) via [@ryangribble](https://github.com/ryangribble) - -**Fixes** - -- Adjust `StartedAt` and `Status` fields of `NewCheckRun` and `CheckRunUpdate` requests, to allow `null` values, avoiding resetting these to default values when not specified - [#1852](https://github.com/octokit/octokit.net/pull/1852) via [@Cyberboss](https://github.com/Cyberboss), [@ryangribble](https://github.com/ryangribble) - -**Documentation Updates** - -- Fixed code samples in GitHub Apps sample docs to use the correct sub client property name - [#1853](https://github.com/octokit/octokit.net/pull/1853) via [@d-a-s](https://github.com/d-a-s) - - -### Milestone: None - -**Fixes** - -- `IssueLabelsClient.RemoveFromIssue()` no longer fails with a HTTP 400 "Bad Request" error from the GitHub Api - [#1868](https://github.com/octokit/octokit.net/pull/1868) via [@ryangribble](https://github.com/ryangribble) - - -### New in 0.31.0 (released 21/07/2018) - -## Advisories and Breaking Changes - -- None - -## Release Notes - -### Milestone: GitHub Apps - -**Features/Enhancements** - -- Implemented Check Suites component of [New Checks Api (Public Beta)](https://developer.github.com/changes/2018-05-07-new-checks-api-public-beta/) - [#1846](https://github.com/octokit/octokit.net/pull/1846) via [@ryangribble](https://github.com/ryangribble), [@Cyberboss](https://github.com/Cyberboss) -- Implemented Check Runs component of [New Checks Api (Public Beta)](https://developer.github.com/changes/2018-05-07-new-checks-api-public-beta/) - [#1847](https://github.com/octokit/octokit.net/pull/1847) via [@ryangribble](https://github.com/ryangribble), [@Cyberboss](https://github.com/Cyberboss) - - -### Milestone: None - -**Features/Enhancements** - -- Add new `EventInfoState` values (`MarkedAsDuplicate`, `UnmarkedAsDuplicate` and `CommentDeleted`) - [#1818](https://github.com/octokit/octokit.net/pull/1818) via [@mirsaeedi](https://github.com/mirsaeedi) -- Add GraphQL NodeId property to all affected response models - [#1806](https://github.com/octokit/octokit.net/pull/1806) via [@ryangribble](https://github.com/ryangribble) -- Implemented [New API parameters for Project Card archiving (Preview)](https://developer.github.com/changes/2018-06-27-project-card-archiving/) including `ProjectCard.Archived`, `ProjectCardUpdate.Archived` and new `ProjectCardRequest` request - [#1842](https://github.com/octokit/octokit.net/pull/1842) via [@ryangribble](https://github.com/ryangribble) -- Implement support for [Archiving repositories](https://developer.github.com/changes/2017-11-08-archiving-repositories/) including adding `Archived` property to `Repository` response model, adding the ability to archive a repository via `UpdateRepository.Archived` request, and filtering repo/issues searches with `SearchRepositoriesRequest.Archived` and `SearchIssuesRequest.Archived` - [#1845](https://github.com/octokit/octokit.net/pull/1845) via [@jguevara](https://github.com/jguevara), [@ryangribble](https://github.com/ryangribble) - -**Fixes** - -- Fix exception in `RepositoriesClient.GetAllLanguages()` when no languages exist - [#1831](https://github.com/octokit/octokit.net/pull/1831) via [@ryangribble](https://github.com/ryangribble) - -**Housekeeping** - -- Remove nuget dependency on `SourceLink.Create.GitHub` package - [#1822](https://github.com/octokit/octokit.net/pull/1822) via [@ryangribble](https://github.com/ryangribble) - -**Documentation Updates** - -- Clarify the rate limit `Reset` field is in UTC - [#1819](https://github.com/octokit/octokit.net/pull/1819) via [@mirsaeedi](https://github.com/mirsaeedi) -- Revise GitHub Apps walkthrough documentation to provide more clarity - [#1824](https://github.com/octokit/octokit.net/pull/1824) via [@ryangribble](https://github.com/ryangribble) - - -### New in 0.30.0 (released 17/06/2018) - -## Advisories and Breaking Changes - -- Note that the `IssuesLabelsClient.RemoveFromIssue()` methods which previously had no return value, will now return an `IReadonlyList