-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Bug Report | ||
description: Report a bug in Enhancements for Garmin Connect | ||
labels: | ||
- bug | ||
body: | ||
- type: textarea | ||
id: description | ||
attributes: | ||
label: Description | ||
placeholder: | | ||
Provide a general description of the bug | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: reproduction | ||
attributes: | ||
label: Reproduction steps | ||
placeholder: | | ||
1. | ||
2. | ||
3. | ||
... | ||
validations: | ||
required: true | ||
- type: dropdown | ||
id: platform | ||
attributes: | ||
label: Which platform did you discover this bug? | ||
options: | ||
- UserScript (Violentmonkey, Tampermonkey, etc) | ||
- Chrome Web Store | ||
- Firefox Add-ons | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: environment | ||
attributes: | ||
label: Please provide the environment you discovered this bug | ||
render: true | ||
placeholder: | | ||
Version: 1.0.0 | ||
Browser: Chrome 123.0.6312 | ||
OS: macOS 14.3 | ||
- type: textarea | ||
id: other | ||
attributes: | ||
label: Additional information |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Feature Request | ||
description: Request a feature to be added to Enhancements for Garmin Connect | ||
labels: | ||
- enhancement | ||
body: | ||
- type: textarea | ||
id: description | ||
attributes: | ||
label: Description of the problem to be solved | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: solution | ||
attributes: | ||
label: Solution to the problem | ||
validations: | ||
required: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
blank_issues_enabled: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
## Description | ||
|
||
<!--- Describe your PR changes here, in detail --> | ||
|
||
## PR Type | ||
- [ ] Bug fix | ||
- [ ] Feature | ||
- [ ] Code-style update | ||
- [ ] Refactoring | ||
- [ ] Documentation update | ||
- [ ] Build related changes | ||
- [ ] CI / CD related changes | ||
- [ ] Other, describe here: | ||
|
||
## Tests performed | ||
|
||
<!--- Describe in detail, how you tested your changes --> | ||
|
||
## Screenshots | ||
|
||
<!--- Add screenshots here, if appropriate --> | ||
|
||
## Additional information | ||
|
||
<!--- Add additional information here, if appropriate --> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
|
||
jobs: | ||
build: | ||
runs-on: self-hosted | ||
strategy: | ||
matrix: | ||
node-version: [ 20.x ] | ||
steps: | ||
- name: Setup repo | ||
uses: actions/checkout@v4 | ||
- name: Setup node ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: corepack enable | ||
- run: yarn install | ||
- run: yarn run prod | ||
- run: zip -r dist/browser/browser.zip dist/browser/* | ||
- name: Archive production artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: dist | ||
path: | | ||
dist/browser/browser.zip | ||
dist/userscript/garmin-connect-enhancements.user.js |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Lint | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
|
||
jobs: | ||
lint: | ||
runs-on: self-hosted | ||
strategy: | ||
matrix: | ||
node-version: [ 20.x ] | ||
steps: | ||
- name: Setup repo | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 50 | ||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/changed-files@v44 | ||
with: | ||
files: | | ||
**.ts | ||
**.js | ||
- name: Has changed files | ||
if: steps.changed-files.outputs.any_changed != 'true' | ||
run: echo "No changed files found, aborting action" | ||
- name: Setup node ${{ matrix.node-version }} | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: corepack enable | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
- run: yarn install | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
- name: Run ESLint | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
run: yarn eslint ${{ steps.changed-files.outputs.all_changed_files }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
if: github.ref_name == github.event.repository.default_branch | ||
inputs: | ||
version: | ||
description: The version to publish (i.e. "v1.2.3"). | ||
type: string | ||
required: true | ||
prerelease: | ||
description: Is this version a prerelease? | ||
type: boolean | ||
default: 'false' | ||
required: true | ||
|
||
permissions: | ||
actions: read | ||
|
||
jobs: | ||
release: | ||
runs-on: self-hosted | ||
environment: production | ||
steps: | ||
- name: Download artifact | ||
id: download-artifact | ||
uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe # v3.1.4 | ||
with: | ||
workflow: build.yml | ||
workflow_conclusion: success | ||
branch: main | ||
allow_forks: false | ||
- name: Release | ||
uses: softprops/action-gh-release@9d7c94cfd0a1f3ed45544c887983e9fa900f0564 # v2.0.4 | ||
with: | ||
tag_name: ${{ inputs.version }} | ||
prerelease: ${{ inputs.prerelease }} | ||
token: ${{ secrets.PAT }} | ||
fail_on_unmatched_files: true | ||
files: | | ||
dist/browser/browser.zip | ||
dist/userscript/garmin-connect-enhancements.user.js |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
## Yarn | ||
.pnp.* | ||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions | ||
|
||
## Node | ||
node_modules/ | ||
|
||
## Project-specific | ||
build/ | ||
dist/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nodeLinker: pnpm |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<module type="WEB_MODULE" version="4"> | ||
<component name="NewModuleRootManager" inherit-compiler-output="true"> | ||
<exclude-output /> | ||
<content url="file://$MODULE_DIR$"> | ||
<sourceFolder url="file://$MODULE_DIR$/scripts" isTestSource="false" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> | ||
<excludeFolder url="file://$MODULE_DIR$/build" /> | ||
<excludeFolder url="file://$MODULE_DIR$/dist" /> | ||
<excludeFolder url="file://$MODULE_DIR$/.idea" /> | ||
<excludeFolder url="file://$MODULE_DIR$/.yarn" /> | ||
<excludeFolder url="file://$MODULE_DIR$/node_modules" /> | ||
</content> | ||
<orderEntry type="sourceFolder" forTests="false" /> | ||
</component> | ||
<component name="TemplatesService"> | ||
<option name="TEMPLATE_FOLDERS"> | ||
<list> | ||
<option value="$MODULE_DIR$/templates" /> | ||
</list> | ||
</option> | ||
</component> | ||
</module> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Installation | ||
|
||
## Prerequisites | ||
|
||
1. Install [Node](https://nodejs.org/) v20 or later. | ||
2. Enable Corepack for [Yarn](https://yarnpkg.com/) v4 | ||
3. Run `yarn install` | ||
|
||
## Build | ||
|
||
#### Development Build | ||
Run `yarn run build:dev` | ||
|
||
#### Production Build | ||
Run `yarn run build:prod` | ||
|
||
## Packaging | ||
* To build for UserScript: `yarn run package:add-userscript-header` | ||
* To build for Chrome extension / Firefox add-on `yarn run package:setup-browser` | ||
|
||
## Complete production build | ||
* Alternatively, to build for production against all platforms, run `yarn run prod` | ||
|
||
## Build and distributable directories breakdown | ||
* `build/` _(contains the raw build files)_ | ||
* `dist/` | ||
* `browser/` _(contains the browser extension distributables)_ | ||
* `userscript/` _(contains the UserScript distributable)_ | ||
|
||
## Build & Watch For Changes | ||
For use during development: | ||
|
||
1. Run `yarn run dev` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2024 Wilson La | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |