7.1 KiB
Contributing to BLS cal
Contributions are what makes the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
House rules
- Before submitting a new issue or PR, check if it already exists in issues or PRs.
- GitHub issues: take note of the
🚨 needs approvallabel.- For Contributors:
- Feature Requests: Wait for a core member to approve and remove the
🚨 needs approvallabel before you start coding or submit a PR. - Bugs, Security, Performance, Documentation, etc.: You can start coding immediately, even if the
🚨 needs approvallabel is present. This label mainly concerns feature requests.
- Feature Requests: Wait for a core member to approve and remove the
- Our Process:
- Issues from non-core members automatically receive the
🚨 needs approvallabel. - We greatly value new feature ideas. To ensure consistency in the product's direction, they undergo review and approval.
- Issues from non-core members automatically receive the
- For Contributors:
Priorities
Developing
The development branch is main. This is the branch that all pull
requests should be made against. The changes on the main
branch are tagged into a release monthly.
To develop locally:
-
Fork this repository to your own GitHub account and then clone it to your local device.
-
Create a new branch:
git checkout -b MY_BRANCH_NAME -
Install yarn:
npm install -g yarn -
Install the dependencies with:
yarn -
Set up your
.envfile:- Duplicate
.env.exampleto.env. - Use
openssl rand -base64 32to generate a key and add it underNEXTAUTH_SECRETin the.envfile. - Use
openssl rand -base64 32to generate a key and add it underCALENDSO_ENCRYPTION_KEYin the.envfile.
- Duplicate
-
Setup Node If your Node version does not meet the project's requirements as instructed by the docs, "nvm" (Node Version Manager) allows using Node at the version required by the project:
nvm useYou first might need to install the specific version and then use it:
nvm install && nvm useYou can install nvm from here.
-
Start developing and watch for code changes:
yarn dev
Building
You can build the project with:
yarn build
Please be sure that you can make a full production build before pushing code.
Testing
More info on how to add new tests coming soon.
Running tests
This will run and test all flows in multiple Chromium windows to verify that no critical flow breaks:
yarn test-e2e
Resolving issues
E2E test browsers not installed
Run npx playwright install to download test browsers and resolve the error below when running yarn test-e2e:
Executable doesn't exist at /Users/alice/Library/Caches/ms-playwright/chromium-1048/chrome-mac/Chromium.app/Contents/MacOS/Chromium
Linting
To check the formatting of your code:
yarn lint
If you get errors, be sure to fix them before committing.
Making a Pull Request
- Be sure to check the "Allow edits from maintainers" option while creating your PR.
- If your PR refers to or fixes an issue, be sure to add
refs #XXXorfixes #XXXto the PR description. ReplacingXXXwith the respective issue number. See more about Linking a pull request to an issue. - Be sure to fill the PR Template accordingly.
- Review App Contribution Guidelines when building integrations
Guidelines for committing yarn lockfile
Do not commit your yarn.lock unless you've made changes to the package.json. If you've already committed yarn.lock unintentionally, follow these steps to undo:
If your last commit has the yarn.lock file alongside other files and you only wish to uncommit the yarn.lock:
git checkout HEAD~1 yarn.lock
git commit -m "Revert yarn.lock changes"
NB: You may have to bypass the pre-commit hook with by appending --no-verify to the git commit
If you've pushed the commit with the yarn.lock:
- Correct the commit locally using the above method.
- Carefully force push:
git push origin <your-branch-name> --force
If yarn.lock was committed a while ago and there have been several commits since, you can use the following steps to revert just the yarn.lock changes without impacting the subsequent changes:
-
Checkout a Previous Version:
-
Find the commit hash before the
yarn.lockwas unintentionally committed. You can do this by viewing the Git log:git log yarn.lock -
Once you have identified the commit hash, use it to checkout the previous version of
yarn.lock:git checkout <commit_hash> yarn.lock
-
-
Commit the Reverted Version:
-
After checking out the previous version of the
yarn.lock, commit this change:git commit -m "Revert yarn.lock to its state before unintended changes"
-
-
Proceed with Caution:
-
If you need to push this change, first pull the latest changes from your remote branch to ensure you're not overwriting other recent changes:
git pull origin <your-branch-name> -
Then push the updated branch:
git push origin <your-branch-name>
-
Lastly, make sure to keep the branches updated (e.g. click the Update branch button on GitHub PR).