Skip to content

docs: add note about how GITHUB_TOKEN is created #71

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

Merged
merged 2 commits into from
Sep 5, 2020
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ to your project or organization:
command, because [changing default branch of a repository currently requires administrative token rights](https://developer.github.com/v3/repos/#update-a-repository).
You can generate a token from your [personal access tokens page](https://github.com/settings/tokens/new).

The `GITHUB_TOKEN` secret you see in the examples is automatically created for
you when you enable GitHub Actions. To learn more about how it works, read
["Authenticating with the GITHUB\_TOKEN"](https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token)
in the GitHub Docs.

## Usage

Assuming your project has Github Actions enabled, each time you [**close**](https://developer.github.com/webhooks/event-payloads/#milestone)
Expand Down
2 changes: 1 addition & 1 deletion src/Github/CreateReleaseTextThroughChangelog.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ private function normalizeChangelogHeadings(string $changelog): string
// We will then remove the current line, as the delimiter is no
// longer necessary.
/** @psalm-var "-"|"=" $delimiter */
$delimiter = $matches['delim']{0};
$delimiter = $matches['delim'][0];
/** @psalm-var non-empty-string $heading */
$heading = strtr($delimiter, ['-' => '####', '=' => '###']);
$lines[$i - 1] = $heading . ' ' . $previousLine;
Expand Down