New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: convert to cloudflare workers template #2
Merged
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
fc86e1d
feat: convert to cloudflare workers template
0-vortex 8954c25
build: update wrangler to miniflare compatible build options
0-vortex 5f3b486
fix: keep deploy url secret
0-vortex c842cfb
fix: correct local development in wrangler2
0-vortex a2f3285
build: implement security verification
0-vortex 2720c1b
refactor: code split octokit and worker code
0-vortex File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
max_line_length = 120 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
max_line_length = 0 | ||
trim_trailing_whitespace = false |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
module.exports = { | ||
plugins: [ | ||
"jest" | ||
], | ||
extends: [ | ||
"airbnb-base/legacy", | ||
"airbnb-base/whitespace", | ||
], | ||
env: { | ||
browser: true, | ||
serviceworker: true, | ||
es2021: true, | ||
"jest/globals": true | ||
}, | ||
globals: { | ||
// secrets | ||
APP_ID: "readonly", | ||
APP_PK: "readonly", | ||
CLIENT_ID: "readonly", | ||
CLIENT_SECRET: "readonly", | ||
WEBHOOK_SECRET: "readonly", | ||
DISCORD_URL: "readonly", | ||
}, | ||
parserOptions: { | ||
ecmaVersion: 13, | ||
ecmaFeatures: { | ||
impliedStrict: true | ||
}, | ||
sourceType: "module", | ||
allowImportExportEverywhere: false | ||
}, | ||
ignorePatterns: [ | ||
'dist/', | ||
'node_modules/', | ||
'worker/', | ||
], | ||
rules: { | ||
"no-console": 0, | ||
"import/no-unresolved": 0, | ||
"import/extensions": 0, | ||
"no-restricted-syntax": 0, | ||
"no-restricted-globals": 0, | ||
camelcase: [2, { | ||
allow: [ | ||
"avatar_url" | ||
], | ||
}] | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
schedule: | ||
- cron: '56 5 * * 1' | ||
|
||
jobs: | ||
analyze: | ||
uses: open-sauced/open-sauced/.github/workflows/codeql-analysis.yml@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: "Compliance" | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
|
||
permissions: | ||
pull-requests: write | ||
|
||
jobs: | ||
compliance: | ||
uses: open-sauced/open-sauced/.github/workflows/compliance.yml@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: "Development" | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
- reopened | ||
|
||
jobs: | ||
test: | ||
uses: open-sauced/open-sauced/.github/workflows/development.yml@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- alpha | ||
- beta | ||
|
||
concurrency: | ||
group: environment-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
name: Test and lint | ||
uses: open-sauced/open-sauced/.github/workflows/development.yml@main | ||
|
||
build: | ||
name: Build application | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "βοΈ checkout repository" | ||
uses: actions/checkout@v2 | ||
|
||
- name: "π§ setup node" | ||
uses: actions/setup-node@v2.1.5 | ||
with: | ||
node-version: 16 | ||
|
||
- name: "π§ install npm@latest" | ||
run: npm i -g npm@latest | ||
|
||
- name: "π¦ install dependencies" | ||
uses: bahmutov/npm-install@v1 | ||
|
||
- name: "π repository visualizer" | ||
id: diagram | ||
uses: githubocto/repo-visualizer@0.7.1 | ||
with: | ||
excluded_paths: "node_modules,build,.storybook,.netlify,.github,npm-shrinkwrap.json" | ||
output_file: "public/diagram.svg" | ||
should_push: false | ||
root_path: "src/" | ||
|
||
- name: "π visualiser artifacts" | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: diagram | ||
path: public/diagram.svg | ||
|
||
release: | ||
environment: | ||
name: production | ||
url: https://github.com/${{ github.repository }}/releases/tag/${{ steps.semantic-release.outputs.release-tag }} | ||
name: Semantic release | ||
needs: | ||
- test | ||
- build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "βοΈ checkout repository" | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: "β»οΈ clean up artifact paths" | ||
run: | | ||
rm -rf public/diagram.svg | ||
|
||
- name: "π download diagram artifacts" | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: diagram | ||
path: public/ | ||
|
||
- name: "π release" | ||
id: semantic-release | ||
uses: open-sauced/release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
cleanup: | ||
name: Cleanup actions | ||
needs: | ||
- release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "β»οΈ remove build artifacts" | ||
uses: geekyeggo/delete-artifact@v1 | ||
with: | ||
name: | | ||
diagram |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: "Assign issues" | ||
|
||
on: | ||
issue_comment: | ||
types: | ||
- created | ||
- edited | ||
|
||
jobs: | ||
assign: | ||
uses: open-sauced/open-sauced/.github/workflows/triage.yml@main |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to
npx wrangler
after a successful release?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried that in 5f3b486 but it leaks deployment URL :/ can put it back and test it out for a while