Skip to content

Commit

Permalink
Merge pull request #4 from cphelefu/fixing-lint-errors
Browse files Browse the repository at this point in the history
finishing fix of lint errors
  • Loading branch information
cphelefu authored Sep 11, 2024
2 parents 870c3f0 + 825534d commit 58154cb
Show file tree
Hide file tree
Showing 21 changed files with 623 additions and 26 deletions.
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report---for-zenhub-issues-creation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Bug report - For ZenHub Issues Creation
about: Create a report to help us improve
title: "[BUG] <title>"
labels: 'problem: bug, triage'
assignees: ''

---

**Is there an existing issue for this?**
Please search to see if an issue already exists for the bug you encountered.

**Current Behavior**
A concise description of what you're experiencing.

**Expected Behavior**
A concise description of what you expected to happen.

**Steps To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Anything else?**
References? Anything that will give us more context about the issue you are encountering and if applicable, add screenshots to help explain your problem.
44 changes: 44 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: 🐞 Bug
description: File a bug/issue
title: "[BUG] <title>"
labels: ["problem: bug", triage]
body:
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Current Behavior
description: A concise description of what you're experiencing.
validations:
required: false
- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
validations:
required: false
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. In this environment...
2. With this config...
3. Run '...'
4. See error...
validations:
required: false
- type: textarea
attributes:
label: Anything else?
description: |
Links? References? Anything that will give us more context about the issue you are encountering!
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Feature request- For ZenHub Issues Creation
about: Suggest an idea for this project
title: "[FEATURE] <title>"
labels: 'addition: feature, triage'
assignees: ''

---

**Is there an existing issue for this?**
Please search to see if an issue already exists for this feature.

**Who request this Feature**
Individual, team, project, organization...

**User Story**
A concise description of what you expected to happen (one paragraph).
As a [user type], I would like ...

**Implementation UI**
If needed, what user interface do you suggest, feel free to add mockups.

**Additional context**
Add any other context or screenshots about the feature request here.
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Feature
description: File a new feature request
title: "[FEATURE] <title>"
labels: ["addition: feature", triage]
body:
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for this feature.
options:
- label: I have searched the existing issues
required: true
- type: input
attributes:
label: Who request this Feature
description: Individual, team, project, organization...
validations:
required: false
- type: textarea
attributes:
label: User Story
description: A concise description of what you expected to happen (one paragraph).
placeholder: |
As a [user type], I would like ...
validations:
required: true
- type: textarea
attributes:
label: Implementation UI
description: If needed, what user interface do you suggest, feel free to add mockups.
validations:
required: false
31 changes: 31 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

# How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

__Add the URL for your deploy!__

# Checklist:

- [ ] I have build __(npm run build)__ and deploy __(npm run deploy)__ my PR
- [ ] I have connected the issues(s) to this PR
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] My changes generate no new warnings
- [ ] I have created new issue(s) related to the outcome of this PR is needed
- ~~I have made corresponding changes to the documentation~~
- ~~I have added tests that prove my fix is effective or that my feature works~~
- ~~New and existing unit tests pass locally with my changes~~
31 changes: 31 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

# How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

__Add the URL for your deploy!__

# Checklist:

- [ ] I have build __(npm run build)__ and deploy __(npm run deploy)__ my PR
- [ ] I have connected the issues(s) to this PR
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] My changes generate no new warnings
- [ ] I have created new issue(s) related to the outcome of this PR is needed
- ~~I have made corresponding changes to the documentation~~
- ~~I have added tests that prove my fix is effective or that my feature works~~
- ~~New and existing unit tests pass locally with my changes~~
47 changes: 47 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
on:
workflow_call:
inputs:
cache_sha:
type: string
required: true

permissions:
contents: write

env:
NODE_VERSION: '20.11.0'
PNPM_VERSION: '8.15.0'

jobs:
build:
name: build-geoview
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.push.repo.full_name || github.repository }}

- uses: actions/setup-node@v3
name: Install node
with:
node-version: ${{ env.NODE_VERSION }}

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: ${{ env.PNPM_VERSION }}
run_install: false

# Run rush install and build on our code
- name: Install Rush
run: node common/scripts/install-run-rush.js install

- name: Persist build output for other workflows
uses: actions/cache@v3
with:
path: dist
key: dist-${{ inputs.cache_sha }}

- name: Rush Build
run: node common/scripts/install-run-rush.js build:core
67 changes: 67 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ main, master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
schedule:
- cron: '32 3 * * 4'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
64 changes: 64 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Publish to GitHub pages

on:
workflow_call:
inputs:
cache_sha:
type: string
required: true
folder:
type: string
required: true

jobs:
deploy-to-pages:
name: Deploy gh-pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Get dist files
uses: actions/cache@v3
with:
path: dist
key: dist-${{ inputs.cache_sha }}

- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: dist
target-folder: ${{inputs.folder}}
single-commit: true

- uses: actions/github-script@v6
name: Post link to demo for PR's
if: github.event_name == 'pull_request_target' && github.event.action == 'opened'
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `Your demo site is ready! 🚀 Visit it here: https://${{github.repository_owner}}.github.io/geoview-demo/${{inputs.folder}}`
})
cleanup-pages:
name: Cleanup gh-pages
runs-on: ubuntu-latest
steps:
## Delete the PR demo from gh-pages when the PR is closed
- uses: actions/checkout@v3
with:
ref: 'gh-pages'

- name: Delete the files
if: github.event_name == 'pull_request_target' && github.event.action == 'closed'
continue-on-error: true
shell: bash
run: |
git config --global user.email "[email protected]"
git config --global user.name "Johann Levesque"
git rm -r ${{ github.head_ref }}/*
git commit -a -m 'Delete PR demo ${{ github.head_ref }}'
git push origin HEAD:gh-pages
Loading

0 comments on commit 58154cb

Please sign in to comment.