Skip to content

Commit df89504

Browse files
authored
Merge pull request #27 from pavinduLakshan/web_components
docs: improve contributing guides & pr templates
2 parents 655ca45 + dd2f371 commit df89504

File tree

5 files changed

+164
-4
lines changed

5 files changed

+164
-4
lines changed
File renamed without changes.
File renamed without changes.

CONTRIBUTING.md

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
## Contributing to Asgardeo Web UI SDKs
2+
3+
This guide walks you through setting up the development environment and other important information for contributing to Asgardeo Web UI SDKs.
4+
5+
### Setting up development environment
6+
7+
> Prerequisites:
8+
>
9+
> Node.js: v18 or higher
10+
> PNPM: v9 or higher
11+
12+
1. Install dependencies.
13+
14+
```bash
15+
pnpm install
16+
```
17+
18+
2. Build the project.
19+
20+
```bash
21+
pnpm build
22+
```
23+
24+
## Commit Message Guidelines
25+
26+
*This specification is inspired by and supersedes the [AngularJS commit message format][commit-message-format].*
27+
28+
We have very precise rules over how our Git commit messages must be formatted.
29+
This format leads to **easier to read commit history**.
30+
31+
Each commit message consists of a **header**, a **body**, and a **footer**.
32+
33+
```
34+
<header>
35+
<BLANK LINE>
36+
<body>
37+
<BLANK LINE>
38+
<footer>
39+
```
40+
41+
The `header` is mandatory and must conform to the [Commit Message Header](#commit-header) format.
42+
43+
The `body` is mandatory for all commits except for those of type "docs".
44+
When the body is present it must be at least 20 characters long and must conform to the [Commit Message Body](#commit-body) format.
45+
46+
The `footer` is optional. The [Commit Message Footer](#commit-footer) format describes what the footer is used for and the structure it must have.
47+
48+
49+
### <a name="commit-header"></a>Commit Message Header
50+
51+
```
52+
<type>(<scope>): <short summary>
53+
│ │ │
54+
│ │ └─⫸ Summary in present tense. Not capitalized. No period at the end.
55+
│ │
56+
│ └─⫸ Commit Scope: primitives|scss|react
57+
58+
└─⫸ Commit Type: build|ci|docs|feat|fix|perf|refactor|chore|test
59+
```
60+
61+
The `<type>` and `<summary>` fields are mandatory, the `(<scope>)` field is optional.
62+
63+
64+
#### Type
65+
66+
Must be one of the following:
67+
68+
* **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
69+
* **ci**: Changes to our CI configuration files and scripts (examples: CircleCi, SauceLabs)
70+
* **docs**: Documentation only changes
71+
* **feat**: A new feature
72+
* **fix**: A bug fix
73+
* **perf**: A code change that improves performance
74+
* **refactor**: A code change that neither fixes a bug nor adds a feature
75+
* **chore**: Housekeeping tasks that doesn't require to be highlighted in the changelog
76+
* **test**: Adding missing tests or correcting existing tests
77+
78+
79+
#### Scope
80+
The scope should be the name of the npm package affected (as perceived by the person reading the changelog generated from commit messages).
81+
82+
The following is the list of supported scopes:
83+
84+
* `core` - Changes to the `core` / `@asgardeo/js` package.
85+
* `react` - Changes to the `@asgardeo/react` package.
86+
* `workspace` - Changes to the workspace.
87+
* `sample-app` - Changes to the sample app.
88+
89+
There are currently a few exceptions to the "use package name" rule:
90+
91+
* `packaging`: used for changes that change the npm package layout in all of our packages, e.g. public path changes, package.json changes done to all packages, d.ts file/format changes, changes to bundles, etc.
92+
93+
* `changelog`: used for updating the release notes in CHANGELOG.md
94+
95+
* `dev-infra`: used for dev-infra related changes within the directories like /scripts.
96+
97+
* `docs-infra`: used for docs page changes. (`<ROOT>/docs`)
98+
99+
* none/empty string: useful for `test` and `refactor` changes that are done across all packages (e.g. `test: add missing unit tests`) and for docs changes that are not related to a specific package (e.g. `docs: fix typo in example`).
100+
101+
102+
#### Summary
103+
104+
Use the summary field to provide a succinct description of the change:
105+
106+
* Use the imperative, present tense: "change" not "changed" nor "changes".
107+
* Don't capitalize the first letter.
108+
* No dot (.) at the end.
109+
110+
111+
### <a name="commit-body"></a>Commit Message Body
112+
113+
Just as in the summary, use the imperative, present tense: "fix" not "fixed" nor "fixes".
114+
115+
Explain the motivation for the change in the commit message body. This commit message should explain _why_ you are making the change.
116+
You can include a comparison of the previous behavior with the new behavior in order to illustrate the impact of the change.
117+
118+
119+
### <a name="commit-footer"></a>Commit Message Footer
120+
121+
The footer can contain information about breaking changes and deprecations and is also the place to reference GitHub issues, Jira tickets, and other PRs that this commit closes or is related to.
122+
For example:
123+
124+
```
125+
BREAKING CHANGE: <breaking change summary>
126+
<BLANK LINE>
127+
<breaking change description + migration instructions>
128+
<BLANK LINE>
129+
<BLANK LINE>
130+
Fixes #<issue number>
131+
```
132+
133+
or
134+
135+
```
136+
DEPRECATED: <what is deprecated>
137+
<BLANK LINE>
138+
<deprecation description + recommended update path>
139+
<BLANK LINE>
140+
<BLANK LINE>
141+
Closes #<pr number>
142+
```
143+
144+
Breaking Change section should start with the phrase "BREAKING CHANGE: " followed by a summary of the breaking change, a blank line, and a detailed description of the breaking change that also includes migration instructions.
145+
146+
Similarly, a Deprecation section should start with "DEPRECATED: " followed by a short description of what is deprecated, a blank line, and a detailed description of the deprecation that also mentions the recommended update path.
147+
148+
149+
### Revert commits
150+
151+
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit.
152+
153+
The content of the commit message body should contain:
154+
155+
- Information about the SHA of the commit being reverted in the following format: `This reverts commit <SHA>`.
156+
- A clear description of the reason for reverting the commit message.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ This repository contains the source code of the different Web SDKs that can be u
3535
| [![@asgardeo/react](https://img.shields.io/npm/v/@asgardeo/react?color=%23F7B93E&label=%40asgardeo%2Freact&logo=react)](./packages/react/) | React SDK for building customizable UIs for React applications |
3636

3737
## Contribute
38-
Please read [Contributing to the Code Base](http://wso2.github.io/) for details on our code of conduct, and the process for submitting pull requests to us.
38+
Please read [Contributing Guide](CONTRIBUTING.md) for details on how to contribute to Asgardeo web UI SDKs. Refer to [General Contribution Guidelines](http://wso2.github.io/) for details on our code of conduct, and the process for submitting pull requests to us.
3939

4040
### Reporting issues
41-
We encourage you to report issues, improvements, and feature requests creating [Github Issues](https://github.com/asgardeo/asgardeo-auth-react-sdk/issues).
41+
We encourage you to report issues, improvements, and feature requests creating [Github Issues](https://github.com/asgardeo/web-ui-sdks/issues).
4242

43-
Important: And please be advised that security issues must be reported to security@wso2com, not as GitHub issues, in order to reach the proper audience. We strongly advise following the WSO2 Security Vulnerability Reporting Guidelines when reporting the security issues.
43+
**Important**: Please be advised that security issues MUST be reported to <a href="mailto:security@wso2.com">security@wso2com</a>, not as GitHub issues, in order to reach the proper audience. We strongly advise following the WSO2 Security Vulnerability Reporting Guidelines when reporting the security issues.
4444

4545
## License
4646
This project is licensed under the Apache License 2.0. See the [LICENSE](LICENSE) file for details.

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,9 @@
1919
"workspaces": [
2020
"packages/*",
2121
"recipes/*"
22-
]
22+
],
23+
"engines": {
24+
"node": ">=18",
25+
"pnpm": ">=9"
26+
}
2327
}

0 commit comments

Comments
 (0)