-
Notifications
You must be signed in to change notification settings - Fork 46
chore: contributing-information #543
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
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,16 +1,120 @@ | ||||||||||||||||||||||||||||
# Contributing to Forgerock's Javascript SDK | ||||||||||||||||||||||||||||
# Contribution Guidelines for Ping SDK for Javascript | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
:+1::tada: First off, thanks for taking the time to contribute! :tada::+1: | ||||||||||||||||||||||||||||
Welcome! We are excited that you are interested in contributing to the Ping SDK for JavaScript. This document will guide you through the steps required to contribute to the project. | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
The following is a set of guidelines for contributing to the Forgerock SDK and its packages, which are hosted in the [ForgeRock organization](https://github.com/forgerock) on GitHub. | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
# Setting Up Your Development Environment | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
Before you can contribute to the Ping SDK for Javascript, you'll need to set up your development environment. This section describes the prerequisites and steps needed to start using the project in your local machine. | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
## Prerequisites | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
- GitHub account. | ||||||||||||||||||||||||||||
- Git installed. | ||||||||||||||||||||||||||||
- (pnpm)[https://pnpm.io/installation] | ||||||||||||||||||||||||||||
- Node 20 | ||||||||||||||||||||||||||||
- Setup an Advanced Identity Cloud tenant or PingAM instance, as described in the Documentation. | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
## Fork and Clone the Repository | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
Fork the repository to your own GitHub account by clicking the "Fork" button at the top-right of the repository page. | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
Clone your forked repository to your local machine: | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
git clone https://github.com/your-username/forgerock-javascript-sdk.git | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
- Navigate into the project folder: | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
- cd forgerock-javascript-sdk | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
- Build the project to make sure it works, `pnpm build` | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
### Commands in the repo | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
Most commands live within the local `project.json` of the package you are working in. You can use the project.json and the Nx vscode extension to run commands via the code lens. | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
Alternatively there are many ways to run commands, of which a few are to be listed below: | ||||||||||||||||||||||||||||
`pnpm build` will run build on all projects | ||||||||||||||||||||||||||||
`pnpm lint` will run lint on all projects | ||||||||||||||||||||||||||||
`pnpm test` will run unit tests on all projects | ||||||||||||||||||||||||||||
`pnpm e2e` will run e2e tests for all e2e apps | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
You can run commands with `nx` like so: | ||||||||||||||||||||||||||||
`pnpm nx build <name in project.json>` | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
_examples_: | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||
`pnpm nx build javascript-sdk` | ||||||||||||||||||||||||||||
`pnpm nx lint javascript-sdk` | ||||||||||||||||||||||||||||
`pnpm nx test javascript-sdk` | ||||||||||||||||||||||||||||
`pnpm nx e2e autoscript-suites` | ||||||||||||||||||||||||||||
`pnpm nx serve autoscript-apps` | ||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
## Understanding the Project Structure | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
The Ping SDK for Javascript is organized in a modular way. This section is designed to help you understand the layout of the project. We will break down each of the folders and what modules you will find there. Getting familiar with the project structure will make contributing easier and more efficient. | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||
e2e/ | ||||||||||||||||||||||||||||
autoscript-apps | ||||||||||||||||||||||||||||
autoscript-suites | ||||||||||||||||||||||||||||
mock-api | ||||||||||||||||||||||||||||
mock-api-v2 | ||||||||||||||||||||||||||||
token-vault-app | ||||||||||||||||||||||||||||
token-vault-interceptor | ||||||||||||||||||||||||||||
token-vault-proxy | ||||||||||||||||||||||||||||
token-vault-suites | ||||||||||||||||||||||||||||
packages/ | ||||||||||||||||||||||||||||
javascript-sdk | ||||||||||||||||||||||||||||
ping-protect | ||||||||||||||||||||||||||||
token-vault | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
### Package overview | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
- _javascript-sdk_: This is the core module that powers the rest of the packages. OIDC/AIC Callback support/etc | ||||||||||||||||||||||||||||
- _ping-protect_: This is the core package that allows a developer to interact with the Ping Protect signals api. This module will load the signals sdk for you, and provides a lightweight interface for interacting with the modules. | ||||||||||||||||||||||||||||
- _token-vault_: A propreitary way of managing tokens for environments which require high security. | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
### E2E Overview | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||
- *autoscript-suites*: The e2e test location for writing modular and journey e2e's with the javascript-sdk or ping-protect. | ||||||||||||||||||||||||||||
- *autoscript-apps*: A multi-page web application for loading javascript files which call through the journey you are testing programatically | ||||||||||||||||||||||||||||
- *mock-api*: A backend server that serves mock data for the autoscript-apps. This is hard-coded data to mimic what the actual AIC Tenant will respond with | ||||||||||||||||||||||||||||
- *mock-api-v2*: A new version of the mock api, development of this is moved over to the new Ping SDK repo. | ||||||||||||||||||||||||||||
- *token-vault-app*: The application which sets up Token-Vault for testing | ||||||||||||||||||||||||||||
- *token-vault-proxy*: The proxy application (required) for using token vault | ||||||||||||||||||||||||||||
- *token-vault-suites*: The e2e test location for playwright tests. | ||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
### Git Flow | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
Fork the repo to your own github account. From there, you can add the ForgeRock repository as an upstream. | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
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. I think we can move this content to the section 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. I think we still need to address it |
||||||||||||||||||||||||||||
`git remote add upstream [email protected]:ForgeRock/forgerock-javascript-sdk.git` | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
## Here is a checklist of items to ensure your Pull Request is reviewed and ready to be merged: | ||||||||||||||||||||||||||||
Please make PR's against the develop branch, which is the default branch. | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
## Changesets | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
We use changesets for releasing our packages. you can add a changeset when needed (when a change should require a release) using `pnpm changeset` | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
fill out the TUI information and add this to your PR. | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
More information can be found on the [changesets docs](https://changesets-docs.vercel.app/en) | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
## Standards of Practice | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
We ask that all contributors to this project adhere to our engineering Standard for team culture, practices and code of conduct. We expect everyone to be respectful, inclusive, and collaborative. Any violations will be handled according to the project's guidelines. | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
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. Should we provide a link to these standards/guidelines? |
||||||||||||||||||||||||||||
For more details on our Standards of Practice, please refer to the SDK Standards of Practice documentation. | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
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.
Suggested change
|
||||||||||||||||||||||||||||
### Here is a checklist of items to ensure your Pull Request is reviewed and ready to be merged: | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
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.
Suggested change
Make Your ChangesImplement the required changes or new features. Make sure to write clean, well-commented, and readable code. If applicable, include tests and documentation for the new functionality. Commit Your ChangesOnce you’ve made your changes, commit them with a clear and descriptive message. Note that our The commit message should follow this structure:
Types:
Example: git commit -S -m "feat: add login functionality" Push Your ChangesAfter committing your changes, push them to your fork: git push origin feature/my-new-feature Create a Pull Request
PR Review and FeedbackOnce the PR is submitted, the team will review it. Be prepared to:
Here is a checklist of items to ensure your Pull Request is reviewed and ready to be merged:
|
||||||||||||||||||||||||||||
- [ ] Please make all pull requests against `develop` branch. | ||||||||||||||||||||||||||||
- [ ] Fill out the Pull Request template that appears when you open a 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.