Skip to content

Commit

Permalink
add doc for using personal token in github actions and update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
rohit-gohri committed Mar 6, 2020
1 parent c1fcff5 commit b7e1091
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ x

<!-- Your comment below this -->

- Don't use hardcoded userId to update comments if using personal token in Github Actions - [@rohit-gohri]
- Add the staged flag to `danger local` command - [@soyn]
- Disable warning in Github Action if using DANGER_GITHUB_API_TOKEN- [@rohit-gohri]
- Disable warning in Github Action if using DANGER_GITHUB_API_TOKEN - [@rohit-gohri]
- Update `parse-diff` library - [@417-72KI]
- Fix repository slug in Jenkins provider - [sandratatarevicova]
- Fix Typos across danger-js Repo - [@yohix]
Expand Down
17 changes: 16 additions & 1 deletion source/ci_source/providers/GitHubActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,22 @@ import { readFileSync, existsSync } from "fs"
* env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
* ```
*
* [GitHub automatically creates a `GITHUB_TOKEN` secret to use in your workflow](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token). You can use the `GITHUB_TOKEN` to authenticate in a workflow run.
* [GitHub automatically creates a `GITHUB_TOKEN` secret to use in your workflow](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token).
* You can use the `GITHUB_TOKEN` to authenticate in a workflow run.
* Using this token will post the danger comment as the `github-actions` app user.
*
* #### Using Personal Tokens
*
* If you need to post the danger comment as some particular user or for some other reason
* you need to use a personal token for danger then you can provide it in env as DANGER_GITHUB_API_TOKEN,
* but make sure that this is not the [automatically generated GITHUB_TOKEN in actions](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token)
* otherwise comments will not be updated and new ones will be created everytime.
*
* ```yml
* - name: Danger JS
* uses: danger/danger-js@9.1.6
* env: DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
* ```
*
*/

Expand Down

0 comments on commit b7e1091

Please sign in to comment.