Skip to content

Commit

Permalink
fix(store-github): env vars as default values for options that accept…
Browse files Browse the repository at this point in the history
… secrets
  • Loading branch information
paulrobertlloyd committed Jan 22, 2022
1 parent fe3512d commit da9d998
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/store-github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ const github = new GithubStore({

| Option | Type | Description |
| :----- | :--- | :---------- |
| `branch` | `string` | The branch files will be saved to. *Optional*, defaults to `main` |
| `user` | `string` | Your GitHub username. *Required* |
| `repo` | `string` | The name of your GitHub repository. *Required* |
| `token` | `string` | [A GitHub personal access token][pat]. *Required* |
| `user` | `string` | Your GitHub username. *Required*. |
| `repo` | `string` | The name of your GitHub repository. *Required*. |
| `branch` | `string` | The branch files will be saved to. *Optional*, defaults to `main`. |
| `token` | `string` | [A GitHub personal access token][pat]. *Required*, defaults to `process.env.GITHUB_TOKEN`. |

[pat]: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
2 changes: 2 additions & 0 deletions packages/store-github/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import process from 'node:process';
import {Buffer} from 'node:buffer';
import octokit from '@octokit/rest';

const defaults = {
branch: 'main',
token: process.env.GITHUB_TOKEN,
};

/**
Expand Down

0 comments on commit da9d998

Please sign in to comment.