Skip to content

Commit

Permalink
Pass the github_token to the node script
Browse files Browse the repository at this point in the history
  • Loading branch information
captainbrosset committed Sep 1, 2023
1 parent 46e2b18 commit 1e17be8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:
id: findversions
run: |
cd scripts
node report-references-to-old-versions.js
token=${{ secrets.GITHUB_TOKEN }} node report-references-to-old-versions.js
6 changes: 3 additions & 3 deletions scripts/report-references-to-old-versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ async function findReferencesToEdgeVersionsOlderThanRelease() {

async function createIssue(title, content) {
// Create a new issue.
const octokit = github.getOctokit(process.env.GITHUB_TOKEN);
const octokit = github.getOctokit(process.env.token);

const {data: issue} = await octokit.rest.issues.create({
owner: "MicrosoftDocs",
Expand All @@ -124,8 +124,8 @@ findReferencesToEdgeVersionsOlderThanRelease().then(matches => {
console.log('Outdated Edge version references found:');
console.log(report);

if (!process.env.GITHUB_TOKEN) {
console.log('No GITHUB_TOKEN environment variable found, skipping issue creation.');
if (!process.env.token) {
console.log('No token environment variable found, skipping issue creation.');
return;
}

Expand Down

0 comments on commit 1e17be8

Please sign in to comment.