We'd love for you to contribute to our source code and to make Webex SDK Component Adapter even better than it is today! If you would like to contribute to this repository by adding features, enhancements or bug fixes, you must follow our process:
- Create an issue to propose your solution before you get coding
- Let core members know about your proposal by posting a message in the contributor's Webex space
- A core member will review your proposal and if necessary may suggest to have a meeting to better understand your approach
- If your proposal is approved you should start coding at this point
- We recommend opening a draft PR to receive feedback before finalizing your solution
- When opening a draft PR, specify with PR comments where in the code you would like to get feedback
- Before opening a PR ensure all PR guidelines are followed
- Let core members know about your PR by posting a message in the contributor's Webex space
- Core members will review the pull request and provide feedback when necessary
- If a PR is too large, you may be asked to break it down into multiple smaller-scoped PRs
- Once the PR is approved by a core member, it will be merged
- Celebrate! Your code is released 🎈🎉🍻
To get started developing for contributions, follow these steps:
-
Fork the adapter repository
- Click on the
Fork
button on the top-right corner - Wait for Github to finish forking the repository
- Head over to your newly created repository fork
- Click on the
-
Clone your repository fork locally
git clone [email protected]:{your username}/sdk-component-adapter.git
-
Install all project and peer dependencies
cd sdk-component-adapter npx npm-install-peers
-
Open the code with your favorite editor. You're ready! 👍🏼
Pull requests must include code documentation, tests, follow code style and commits format.
All methods, functions and object structures should be documented following JSDoc style comments.
We take testing very seriously, all code changes must include unit, integration and end-to-end tests.
- Unit: Tests at the file level with mocked external requests
- Integration: Tests at the application level with mocked I/O requests
- End-to-end: Tests the application in a system
Code style is enforced by linters. Use npm run linter
to verify that your code is beautiful, too!
We highly discourage disabling eslint rules. Unless there is an exceptional use case, we may request additional changes to your PR.
As part of the build process, commits are run through conventional changelog to generate the changelog. Please adhere to the following guidelines when formatting your commit messages as the commit message will become part of the changelog word by word.
Each commit message consists of a header, a body and a footer. The header has a special format that includes a type, a scope and a subject:
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
The header is mandatory and the scope of the header is optional.
Any line of the commit message cannot be longer 100 characters! This allows the message to be easier to read on GitHub as well as in various git tools.
If the commit reverts a previous commit, it should begin with revert:
, followed by the header of the reverted commit. In the body it should say: This reverts commit <hash>
., where the hash is the SHA of the commit being reverted.
You may use Git to revert changes:
git revert <commit hash>
Must be one of the following:
- build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
- ci: Changes to our CI configuration files and scripts (example scopes: Circle, BrowserStack, SauceLabs)
- docs: Documentation only changes
- feat: A new feature
- fix: A bug fix
- perf: A code change that improves performance
- refactor: A code change that neither fixes a bug nor adds a feature
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- test: Adding missing tests or correcting existing tests
The scope should indicate what is being changed. Generally, these should match component or adapter names. For example, WebexAdapter
, PeopleAdapter
, PeopleSDKAdapter
etc. Other than those, tooling
tends to be the most common.
The subject contains succinct description of the change:
- use the imperative, present tense: "change" not "changed" nor "changes"
- don't capitalize first letter
- no dot (.) at the end
Just as in the subject the imperative, present tense: "change" not "changed" nor "changes". The body should include the motivation for the change and contrast this with previous behavior.
The footer should contain any information about Breaking changes and is also the place to reference GitHub issues that this commit closes.
Breaking Changes should start with the word BREAKING CHANGE:
with a space or two newlines. The rest of the commit message is then used for this.
There is a list of commit types provided here. However, not all commits trigger our release process.
We are using semantic-release to fully automate the version management and package publishing.
By default semantic-release
uses the Angular Commit Message Conventions and triggers release and publishing based on the following rules:
Commit | Release type |
---|---|
Commit with type BREAKING CHANGE |
Major release |
Commit with type feat |
Minor release |
Commit with type fix |
Patch release |
Commit with type perf |
Patch release |