Skip to content

Commit bed4098

Browse files
authored
provide docs for GitHub auth (#126)
1 parent 3da2dd4 commit bed4098

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

docs/github-authentication.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# GitHub authentication
2+
3+
Some commands require access to the GitHub APIs.
4+
5+
The tool uses the GitHub token to authorize user's call to API.
6+
The token can be stored in the `~/.elastic/github.token` file or passed via the `GITHUB_TOKEN` environment variable.
7+
8+
Here are the instructions on how to create your own personal access token (PAT): [GitHub docs - Creating a personal access token][1].
9+
10+
Make sure you have enabled the following scopes:
11+
* `public_repo` — to open pull requests on GitHub repositories.
12+
* `read:user` and `user:email` — to read your user profile information from GitHub.
13+
14+
**NOTE**: Elastic GitHub organization uses SAML authentication, due to this PAT cannot be used for Elastic related repositories **unless authorized**.
15+
After creating or modifying your personal access token, authorize the token for use of the Elastic organization: [GitHub docs - Authorizing a personal access token for use with SAML single sign-on][2].
16+
17+
[1]: https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token
18+
[2]: https://docs.github.com/en/github/authenticating-to-github/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on
19+

docs/usage.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ The fragment is created from the template available in [`../internal/changelog/f
3333

3434
### Previewing the changelog
3535

36+
These steps require [GitHub Authentication](./github-authentication.md).
37+
3638
From the repository root folder build the consolidated changelog with:
3739

3840
```
@@ -61,13 +63,17 @@ You may also be interested in viewing the changelog for unreleased changes.
6163

6264
### Ensuring Changelog Fragment presence in PRs
6365

66+
These steps require [GitHub Authentication](./github-authentication.md).
67+
6468
`elastic-agent-chagelog-tool` has a dedicated command for this: `pr-has-fragment`.
6569
Given a PR number this command checks for presence of an added Changelog Fragment.
6670

6771
For futrher details look at command usage: `elastic-agent-changelog-tool pr-has-fragment --help`
6872

6973
### Previewing the changelog
7074

75+
These steps require [GitHub Authentication](./github-authentication.md).
76+
7177
From the repository root folder build the consolidated changelog with:
7278

7379
```
@@ -84,6 +90,8 @@ An example is [`../changelog/0.1.0.yaml`](../changelog/0.1.0.yaml).
8490

8591
### Including the changelog in a pre-release version
8692

93+
These steps require [GitHub Authentication](./github-authentication.md).
94+
8795
Pre-release versions are development releases, it's worth including the changelog but as they are not stable releases, you should not remove the fragments.
8896
The side effect is that the changelog will include all entries from latest stable release up to current pre-release, but in the end this correctly reflects the content of the provided pre-release.
8997

@@ -101,6 +109,8 @@ The side effect is that the changelog will include all entries from latest stabl
101109
102110
### Preparing the changelog
103111

112+
These steps require [GitHub Authentication](./github-authentication.md).
113+
104114
* Wait for the last BC of the release. If another BC is generated after that or a patch version for a previous minor is released, you might need to restart the process.
105115
* Create a branch **from the commit of the BC**.
106116
* From the root folder of the repository run:

0 commit comments

Comments
 (0)