Skip to content

Commit

Permalink
Update generated info.
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmarcia committed Sep 26, 2023
1 parent 4b1cd82 commit 065ad59
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
- name: Build with Next.js
run: npm run build
env:
GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update happycommits.json
uses: stefanzweifel/git-auto-commit-action@v4
with:
Expand Down
9 changes: 5 additions & 4 deletions generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,18 @@ slugify.extend({
"#": "sharp",
"+": "plus"
});
if (process.env.GH_PERSONAL_ACCESS_TOKEN) {

if (process.env.GITHUB_TOKEN) {
// The environment variable is set
console.log('MY_ENV_VARIABLE is set:', process.env.GH_PERSONAL_ACCESS_TOKEN);
console.log('GITHUB_TOKEN is set:', process.env.GITHUB_TOKEN);
} else {
// The environment variable is not set
console.log('MY_ENV_VARIABLE is not set');
console.log('GITHUB_TOKEN is not set');
}
// Setup Octokit (GitHub API client)
const MyOctokit = Octokit.plugin(throttling, retry);
const octokit = new MyOctokit({
auth: process.env.GH_PERSONAL_ACCESS_TOKEN,
auth: process.env.GITHUB_TOKEN,
throttle: {
onRateLimit: (retryAfter: number, options: object, octokit: Octokit, retryCount: number) => {
const { method, url } = options as RequestOptions;
Expand Down
2 changes: 1 addition & 1 deletion generated.json

Large diffs are not rendered by default.

0 comments on commit 065ad59

Please sign in to comment.