-
-
Notifications
You must be signed in to change notification settings - Fork 168
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
New Log__c & LoggerSettings__c fields #218
Merged
Merged
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
2fd95b3
Added new field Log__c.Scenario__c, set via Logger.setScenario(String)
jongpie e444731
Added support for setting scenario via Flow classes
jongpie 66cf459
Added support for setting scenario via logger lwc
jongpie 3b17f45
Added example usage of setScenario in loggerLWCDemo.js
jongpie db9ecb3
Bumped package version number
jongpie c0cfdef
Created new package version
jongpie 98870aa
Added Logger.CURRENT_VERSION_NUMBER, added new script to auto-sync ve…
jongpie accaf94
Added new field Log__c.LoggerVersionNumber__c
jongpie db86893
Standardized the internal calls to System.debug() to include a 'Logge…
jongpie dcf5bf7
Created new package version
jongpie e30ab43
Cleaned up scripts directory
jongpie 926ec5e
Added 2 new LoggerSettings__c fields - one to disable calls to System…
jongpie 707e10d
Added check in pipeline to ensure that the current package version nu…
jongpie 57cce12
Updated CONTRIBUTING.md
jongpie 76bc075
Automated creating pkg version and updating sfdx-project.json + READM…
jongpie 568e4f2
Fixed some JS lint issues + enabled more lint rules
jongpie 81534bf
Fixed some Apex PMD issues + enabled more PMD rules
jongpie d396f4c
Updated deploy.yml so it checks out the PR branch instead of the commit
jongpie df23254
Added pwsh script to verify that Apex docs have been generated & comm…
jongpie 10f1b42
Created new package version
actions-user 949ec59
Updated version name & description to better reflect the included cha…
jongpie 7c34bd2
Created new package version
actions-user 7f26a72
Added missing step to install package version into demo sandbox
jongpie d1ca055
Fixed #224 by adding a check for UserInfo.getSessionId() to avoid a g…
jongpie 35e53b5
Created new package version
actions-user 0b3a2bb
Created new package version
actions-user a03a7e8
Fixed #223 by adding an extra filter in Log__c query to include/delet…
jongpie 8951dfb
Created new package version
actions-user 48fb053
New buttons for package install links & 'view milestone' in README
jongpie 8bdacaf
Created new package version
actions-user a8860c4
Added missing 'default save method' field to settings list view, shor…
jongpie 2c6b575
Created new package version
actions-user 487bd0c
Added missing check for isConsoleLoggingEnabled is logger.js
jongpie a497f89
Created new package version
actions-user 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
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 |
---|---|---|
|
@@ -5,6 +5,7 @@ on: | |
push: | ||
branches: | ||
- main | ||
- 'devops/**' | ||
paths-ignore: | ||
- 'content/**' | ||
- 'docs/**' | ||
|
@@ -14,7 +15,7 @@ on: | |
- '.gitignore' | ||
- '.prettierignore' | ||
- '.prettierrc' | ||
- 'Contributing.md' | ||
- 'CONTRIBUTING.md' | ||
- 'LICENSE' | ||
- 'package.json' | ||
- 'README.md' | ||
|
@@ -31,7 +32,7 @@ on: | |
- '.gitignore' | ||
- '.prettierignore' | ||
- '.prettierrc' | ||
- 'Contributing.md' | ||
- 'CONTRIBUTING.md' | ||
- 'LICENSE' | ||
- 'package.json' | ||
- 'README.md' | ||
|
@@ -40,7 +41,7 @@ on: | |
|
||
jobs: | ||
code-quality-tests: | ||
name: 'Code Quality Tests' | ||
name: 'Run Code Quality Tests' | ||
runs-on: ubuntu-latest | ||
environment: Test | ||
steps: | ||
|
@@ -64,17 +65,29 @@ jobs: | |
- name: 'Install Salesforce CLI' | ||
run: npm install sfdx-cli --global | ||
|
||
- name: 'LWC Lint verification' | ||
- name: 'Verify package version number is updated' | ||
run: | | ||
echo ${{ env.DEVHUB_SFDX_URL }} > ./DEVHUB_SFDX_URL.txt | ||
sfdx auth:sfdxurl:store --sfdxurlfile ./DEVHUB_SFDX_URL.txt --setalias nebula-logger-packaging --setdefaultdevhubusername | ||
rm ./DEVHUB_SFDX_URL.txt | ||
npm run package:version:number:verify | ||
env: | ||
DEVHUB_SFDX_URL: ${{ secrets.DEVHUB_SFDX_URL }} | ||
|
||
- name: 'Verify LWC with ESLint' | ||
run: npm run lint:verify | ||
|
||
- name: 'Apex SFDX Scanner verification' | ||
run: npm run prepare && npm run scan | ||
- name: 'Verify Apex with SFDX Scanner' | ||
run: npm run scan | ||
|
||
- name: 'Verify docs are updated' | ||
run: npm run docs:verify | ||
|
||
- name: 'Prettier formatting verification' | ||
- name: 'Verify formatting with Prettier' | ||
run: npm run prettier:verify | ||
|
||
lwc-tests: | ||
name: 'LWC Tests' | ||
name: 'Run LWC Tests' | ||
needs: [code-quality-tests] | ||
runs-on: ubuntu-latest | ||
environment: Test | ||
|
@@ -106,7 +119,7 @@ jobs: | |
flags: LWC | ||
|
||
scratch-org-tests: | ||
name: 'Scratch Org Tests' | ||
name: 'Run Scratch Org Tests' | ||
needs: [code-quality-tests] | ||
runs-on: ubuntu-latest | ||
environment: Test | ||
|
@@ -181,15 +194,17 @@ jobs: | |
run: npm run org:delete:noprompt | ||
if: ${{ always() }} | ||
|
||
create-and-install-test-package-version: | ||
name: 'Create & Install Test Package Version' | ||
create-and-install-package-version: | ||
name: 'Create & Install Package Version' | ||
needs: [lwc-tests, scratch-org-tests] | ||
if: ${{ github.event_name == 'pull_request' }} | ||
runs-on: ubuntu-latest | ||
environment: Test | ||
steps: | ||
- name: 'Checkout source code' | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
|
||
- name: 'Restore node_modules cache' | ||
id: cache-npm | ||
|
@@ -222,11 +237,14 @@ jobs: | |
sfdx auth:sfdxurl:store --sfdxurlfile ./DEVHUB_SFDX_URL.txt --setalias nebula-logger-packaging --setdefaultdevhubusername | ||
sfdx auth:sfdxurl:store --sfdxurlfile ./NEBULA_PKG_DEMO_SANDBOX_SFDX_URL.txt --setalias nebula-logger-package-demo | ||
|
||
- name: 'Create & Install Unvalidated Package Version' | ||
run: npx pwsh ./scripts/create-and-install-unvalidated-package-version.ps1 -targetusername nebula-logger-package-demo | ||
- name: 'Create & Install Package Version' | ||
run: npx pwsh ./scripts/build/create-and-install-package-version.ps1 -targetusername nebula-logger-package-demo | ||
|
||
- name: 'Reinstall Latest Released Package Version' | ||
run: npx pwsh ./scripts/install-latest-released-unlocked-package-version.ps1 -targetusername nebula-logger-package-demo | ||
|
||
- name: 'Delete Unvalidated Package Version' | ||
run: npx pwsh ./scripts/delete-unvalidated-package-version.ps1 | ||
- name: 'Commit New Package Version' | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action Bot" | ||
npx prettier --write ./sfdx-project.json | ||
git add ./sfdx-project.json | ||
git commit -m "Created new package version" | ||
git push |
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 |
---|---|---|
@@ -1,9 +1,27 @@ | ||
# Contributing / Development | ||
# Contributing | ||
|
||
Contributions to Nebula Logger are welcome, however we ask that Apex Prettier be run on prior to any pull requests being submitted to this repo. | ||
Contributions to Nebula Logger are welcome - following these guidelines will help make it easier & faster to review & merge any changes you want to contribute. When contributing, the typical process is: | ||
|
||
When developing, to get started: | ||
1. Familiarize yourself with the codebase - you can check out the [wiki](https://github.com/jongpie/NebulaLogger/wiki) and the [Apex docs site](https://jongpie.github.io/NebulaLogger/) to learn more about the code. | ||
2. Before starting your work, create a new issue (or add a comment to an existing issue you want to contribute to) so that we can keep track of who is actively working on an item. | ||
3. Fork this repository. | ||
4. Create a `feature` or `bugfix` branch in your fork based on the `main` branch. | ||
5. Edit the code/metadata in your fork. | ||
6. Send us a pull request when you are done. We'll review your code, provide feedback for any suggestions or required changes, and then merge it when everything is ready. | ||
|
||
- run `npm -i` or `npm install` or `yarn` to grab the latest version of our dependencies | ||
- when using VS Code: ensure that your "Format On Save" editor option is set to `true` (in `settings.json`: `"editor.formatOnSave": true`) | ||
- all unit tests should be run and passing prior to submitting a PR | ||
# Development | ||
|
||
Once you're ready to start working on an issue, you can develop your changes in any scratch org, sandbox, or developer-edition org of your choosing. Using SFDX (Salesforce CLI), VS Code and npm are recommended - this repository includes several scripts and automations using these tools. However, you can use any tools that you prefer, so long as the resulting code changes still conform to the repository's coding standards. | ||
|
||
- Clone your fork of the Nebula Logger repository locally | ||
- Run `npm -i` or `npm install` to grab the latest version of our dependencies, and setup the repository's git hooks | ||
- When committing your changes in `git`, the repository's git hooks automatically run to: | ||
1. Automatically fix/standardize some quality standards - for example, all Apex files will automatically be formatted using `prettier` | ||
2. Automatically verify coding standards - for example, all Apex files will be automatically scanned for PMD rule violations, based on the repository's configured PMD rules. | ||
- Run all unit tests for LWC and Apex, and verify everything is passing prior to submitting a pull request | ||
|
||
# Pull Requests | ||
|
||
- All pull requests should use the `main` branch as the base branch | ||
- Your pull request should have a detailed description that describes your changes, and include any screenshots of noteworthy UI changes (when applicable) | ||
- Pull request merging is restricted to only 'squash and merge' |
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
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
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
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.
Gotta try this stuff out!
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.
It's coming along nicely - the last issue I'm trying to figure out is with the PR status checks. When this step runs a commit/push, it ends up clearing the PR status checks for the build, codecov, etc. If I can't get that figured out soon, I might revert some of these changes for now/finish in a future PR.
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.
Ah yeah. If you see my pipeline, I made the codecov check not required and because the commit has the same name as the required status check, it ends up … checking out … so to speak. That was a hack to still have at least one required check while still automating the recommit
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.
Yeah, that makes sense - and I guess it's not a huge deal if the PR status checks get cleared, they're only getting cleared if everything in the pipeline works successfully, so maybe I won't worry about it for now. Plus, having the package creation automated is incredibly nice - I've spent so much extra time manually running those steps (create package version, updated README, install in a test sandbox, etc.), so I'll probably keep the pipeline as-is, and maybe worry about the status checks later.