Skip to content

Commit

Permalink
Upgrade Node.js to version 16
Browse files Browse the repository at this point in the history
Remove travis config
Setup Husky
Upgrade dependencies
Fixes #12
  • Loading branch information
bokub committed Dec 14, 2022
1 parent ca92eb8 commit b950951
Show file tree
Hide file tree
Showing 7 changed files with 1,224 additions and 86 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/run.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Update Github Stats Gist
name: Update GitHub Stats Gist
on:
workflow_dispatch:
schedule:
Expand All @@ -9,10 +9,17 @@ jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v1
- uses: actions/setup-node@master
with:
node-version: 12
- run: npx github-stats-box
node-version: 16
# If you edit the .js files and want to run them in your GitHub Action, you need to:
# - uncomment the 2 following lines
# - replace "npx github-stats-box@1" with "npm start"
# N.B: Your action will not receive future updates if you do so

# - uses: actions/checkout@master
# - run: npm ci
- run: npx github-stats-box@1
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }} # Do not edit, defined in secrets

Expand Down
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx pretty-quick --staged
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.19.0
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ async function main() {
let stats;
try {
stats = await getStats();
console.info('Successfully fetched statistics from GitHub');
console.info(JSON.stringify(stats, null, 2));
} catch (e) {
throw new Error(`cannot retrieve statistics: ${e.message}`);
}
Expand Down
Loading

0 comments on commit b950951

Please sign in to comment.