-
Notifications
You must be signed in to change notification settings - Fork 2
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: ✨ CWL validations across repo, single instance db, bot restructering, updated CWL github issue template #42
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
e3af52f
feat: :sparkles: support for .cwl file checks (#39)
slugb0t 7dd90b7
refactor: ♻️ update on ui and issue dashboard text (#40)
slugb0t 59fa886
Merge remote-tracking branch 'origin/staging' into cwl-feature
slugb0t 1b98a1e
feat: :sparkles: recursive search for all cwl files in repo
slugb0t f417db4
wip: :construction: handle multiple cwl validations
slugb0t a15acd3
feat: :sparkles: validate multiple cwl files across repo
slugb0t 4fd2e16
feat: :sparkles: validate cwl files with deployed server
slugb0t e1d65e2
refactor: :recycle: apply collapsible table for cwl validation report
slugb0t 7ddd067
feat: :sparkles: db singleton + issue number added to installation table
slugb0t 2512c8b
chore: :hammer: code cleanup
slugb0t bb56bc1
feat: :sparkles: remove db as parameters throughout codefair bot
slugb0t b2342d9
fix: :bug: patch verify repo name function
slugb0t 2a01ea3
docs: :memo: add JSDoc comments on new functions
slugb0t c2008fc
Merge remote-tracking branch 'origin/staging' into cwl-feature
slugb0t ecf2d66
refactor: :recycle: key value for issue number change
slugb0t 3804145
feat: :sparkles: rerun cwl validations from frontend, on uninstall de…
slugb0t ffb8bd9
feat: :sparkles: handles for when issue is closed and reopened
slugb0t File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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,31 @@ | ||||||
import { MongoClient } from "mongodb"; | ||||||
const MONGODB_URI = process.env.MONGODB_URI; | ||||||
const MONGODB_DB_NAME = process.env.MONGODB_DB_NAME; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (code-quality): Prefer object destructuring when accessing and using properties. (
Suggested change
ExplanationObject destructuring can often remove an unnecessary temporary reference, as well as making your code more succinct.From the Airbnb Javascript Style Guide |
||||||
|
||||||
class Database { | ||||||
constructor() { | ||||||
if (!Database.instance) { | ||||||
this.client = new MongoClient(MONGODB_URI, {}); | ||||||
Database.instance = this; | ||||||
} | ||||||
|
||||||
return Database.instance; | ||||||
} | ||||||
|
||||||
async connect() { | ||||||
if (!this.db) { | ||||||
await this.client.connect(); | ||||||
this.db = this.client.db(MONGODB_DB_NAME); | ||||||
} | ||||||
|
||||||
return this.db; | ||||||
} | ||||||
|
||||||
getDb() { | ||||||
return this.db; | ||||||
} | ||||||
} | ||||||
|
||||||
const instance = new Database(); | ||||||
|
||||||
export default instance; |
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.
suggestion (code-quality): Prefer object destructuring when accessing and using properties. (
use-object-destructuring
)Explanation
Object destructuring can often remove an unnecessary temporary reference, as well as making your code more succinct.From the Airbnb Javascript Style Guide