Skip to content

Commit

Permalink
try again
Browse files Browse the repository at this point in the history
  • Loading branch information
ecraig12345 committed Nov 20, 2024
1 parent 0e2d7f8 commit d329770
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ jobs:

- run: yarn --frozen-lockfile

- name: Check token
if: github.event_name == 'push'
run: yarn check-token "$TOKEN"
env:
TOKEN: ${{ secrets.TOKEN_GITHUB_READ }}

- name: Check formatting
run: yarn format:check

Expand Down
7 changes: 2 additions & 5 deletions scripts/checkToken.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@ export async function checkToken(token) {
/** @type {import('node-fetch').Response} */
let result;
try {
result = await fetch('https://api.github.com/repos/microsoft/m365-renovate-config/branches', {
headers: {
Authorization: `Bearer ${token}`,
Accept: 'application/vnd.github+json',
},
result = await fetch('https://api.github.com', {
headers: { Authorization: `Bearer ${token}` },
});
} catch (err) {
throw new Error('Error checking GitHub token: ' + err);
Expand Down

0 comments on commit d329770

Please sign in to comment.