Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .clasp.json
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
{"scriptId":"173MDT6agB4QGsDHEDa7Ghq4gNxD63njAsOn01Q3fBGp3e1YQJihtNe45","rootDir":"C:\\Users\\benne\\source\\repos\\aptech\\auto-sheets"}
{
"scriptId":"173MDT6agB4QGsDHEDa7Ghq4gNxD63njAsOn01Q3fBGp3e1YQJihtNe45"
}
3 changes: 3 additions & 0 deletions .claspignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**/**
!Code.js
!appsscript.json
19 changes: 19 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"googleappsscript"
],
"env": {
"googleappsscript/googleappsscript": true
},
"ignorePatterns": [
"*.js"
]
}
24 changes: 24 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## Checklist

- [ ] I have created a feature branch.
- [ ] I have marked PR as ready-for-review.
- [ ] @ the person responsible for reviewing proposed changes.

## Description

_Ensure the PR description clearly describes the problem and solution, and provide as much relevant
information as possible._

## Proposed Changes

_List your proposed changes below._

-
-
-

## Issue Resolution

_If there is an existing issue report for this PR, indicate which issue._

This PR fixes #
55 changes: 55 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Run Checks

on:
push:
branches:
- main
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review

jobs:
lint:
runs-on: ubuntu-latest
name: Lint
if: ${{ !github.event.pull_request.draft }}
steps:
- name: Fetch Repository
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Cache Dependencies
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
run: npm ci
- name: Lint
run: npm run lint
build:
runs-on: ubuntu-latest
name: Build
needs: lint
if: ${{ !github.event.pull_request.draft }}
steps:
- name: Fetch Repository
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Cache Dependencies
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
run: npm ci
- name: Build
run: npm run build
43 changes: 43 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Push GAS Project

on:
workflow_dispatch:
push:
branches:
- main
schedule:
- cron: "0 0 * * SUN"

jobs:
push:
runs-on: ubuntu-latest
name: Push to scripts.google.com
steps:
- name: Fetch Repository
if: ${{ github.event_name != 'schedule' }}
uses: actions/checkout@v4
- name: Install Dependencies
run: npm ci
- name: Write clasp Secret to Home Directory
run: echo "$CLASPRC_JSON_SECRET" >> ~/.clasprc.json
env:
CLASPRC_JSON_SECRET: ${{ secrets.CLASPRC_JSON }}
- name: Check clasp Login Status
run: npx clasp login --status
- name: Save Current clasp Secret to Environment Variable
run: |
echo ::add-mask::$(tr -d '\n\r' < ~/.clasprc.json)
echo "CLASPRC_JSON_FILE=$(tr -d '\n\r' < ~/.clasprc.json)" >> $GITHUB_ENV
- name: Save clasp Environment Variable to Repo Secret
if: ${{ env.CLASPRC_JSON_FILE != env.CLASPRC_JSON_SECRET }}
uses: hmanzur/actions-set-secret@v2.0.0
env:
CLASPRC_JSON_SECRET: ${{ secrets.CLASPRC_JSON }}
with:
name: "CLASPRC_JSON"
value: ${{ env.CLASPRC_JSON_FILE }}
repository: ${{ github.repository }}
token: ${{ secrets.REPO_ACCESS_TOKEN }}
- name: Push Script to scripts.google.com
if: ${{ github.event_name != 'schedule' }}
run: npm run push
37 changes: 37 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Compiled output files
build
Code.js

# Dependency directories
node_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Optional REPL history
.node_repl_history

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# .npmrc
engine-strict=true
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"proseWrap": "always",
"printWidth": 110,
"bracketSpacing": true,
"semi": false
}
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint"]
}
14 changes: 14 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"json.schemas": [
{
"fileMatch": ["appsscript.json"],
"url": "https://json.schemastore.org/appsscript.json"
},
{
"fileMatch": [".clasp.json"],
"url": "https://json.schemastore.org/clasp.json"
}
]
}
3 changes: 0 additions & 3 deletions Code.js

This file was deleted.

7 changes: 3 additions & 4 deletions appsscript.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"timeZone": "America/New_York",
"dependencies": {
},
"timeZone": "Africa/Lagos",
"dependencies": {},
"exceptionLogging": "STACKDRIVER",
"runtimeVersion": "V8"
}
}
Loading