Skip to content

Commit 6c58ffe

Browse files
authored
docs: enhance CONTRIBUTING.md with detailed setup and workflow instructions (#1115)
1 parent a20c8bf commit 6c58ffe

File tree

1 file changed

+148
-7
lines changed

1 file changed

+148
-7
lines changed

CONTRIBUTING.md

Lines changed: 148 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,144 @@
1+
# Contributing to Auth0 Deploy CLI
2+
3+
Thank you for your interest in contributing! This guide will help you get started with contributing to the Auth0 Deploy CLI project.
4+
5+
## Getting Started
6+
7+
### Prerequisites
8+
9+
- Node.js ≥20.18.1
10+
- Git with signed commits configured
11+
- Auth0 Development Tenant (for testing)
12+
13+
### Fork and Clone
14+
15+
1. **Fork** the repository on GitHub
16+
2. **Clone** your fork locally:
17+
```bash
18+
git clone https://github.com/YOUR_USERNAME/auth0-deploy-cli.git
19+
cd auth0-deploy-cli
20+
```
21+
3. **Add upstream** remote:
22+
```bash
23+
git remote add upstream https://github.com/auth0/auth0-deploy-cli.git
24+
```
25+
26+
### Development Setup
27+
28+
```bash
29+
# Install dependencies
30+
npm ci
31+
```
32+
33+
## Development Workflow
34+
35+
### Create Feature Branch
36+
37+
```bash
38+
# Sync with upstream
39+
git fetch upstream
40+
git checkout master
41+
git merge upstream/master
42+
43+
# Create feature branch
44+
git checkout -b feature/your-feature-name
45+
```
46+
47+
### Development Commands
48+
49+
```bash
50+
# Development with watch mode
51+
npm run dev
52+
53+
# Run tests
54+
npm test
55+
56+
# Run single test file
57+
npx ts-mocha test/path/to/specific.test.ts
58+
59+
# Lint and format
60+
npm run lint:fix
61+
npm run format
62+
63+
# Check TypeScript compilation
64+
npx tsc --noEmit
65+
66+
# Run CLI locally for testing
67+
npm run build && node lib/index.js --help
68+
```
69+
70+
### Testing Requirements
71+
72+
Before submitting a PR, ensure all tests pass:
73+
74+
```bash
75+
# Unit tests (required)
76+
npm test
77+
```
78+
79+
### Testing Your Changes Locally
80+
81+
To test your changes with the actual CLI:
82+
83+
```bash
84+
# Build the project
85+
npm run build
86+
87+
# Run CLI commands locally
88+
node lib/index.js --help
89+
node lib/index.js export --help
90+
node lib/index.js import --help
91+
92+
# Example: Test export command
93+
node lib/index.js export -c config.json -f yaml -o ./local-export/
94+
95+
# Example: Test import command
96+
node lib/index.js import -c config.json -i ./local-export/tenant.yaml
97+
```
98+
99+
### Running Individual Tests
100+
101+
To run a single test file or specific test:
102+
103+
```bash
104+
# Run all tests in a file
105+
npx ts-mocha --timeout=7500 -p tsconfig.json test/tools/auth0/handlers/actions.tests.js
106+
107+
# Run a specific test by name
108+
npx ts-mocha --timeout=7500 -p tsconfig.json \
109+
test/tools/auth0/handlers/actions.tests.js \
110+
-g="should create action"
111+
```
112+
113+
## Code Standards
114+
115+
- **ESLint** (Airbnb base configuration)
116+
- **Prettier** formatting (100 character line width)
117+
- **Comprehensive test coverage** for new functionality
118+
- **JSDoc comments** for public APIs
119+
120+
## Pull Request Process
121+
122+
1. **Ensure your branch is up to date** with upstream master
123+
2. **Run all tests** and ensure they pass
124+
3. **Create PR** against the `master` branch
125+
4. **Fill out the PR template** completely:
126+
- Clear description of changes
127+
- Link to related issues
128+
- Testing approach
129+
- Complete the checklist
130+
5. **Address code review feedback**
131+
6. **Ensure CI checks pass**
132+
133+
### PR Requirements
134+
135+
- ✅ All CI checks pass
136+
- ✅ Code review approved
137+
- ✅ Tests added/updated for new functionality
138+
- ✅ Documentation updated (if applicable)
139+
- ✅ No merge conflicts
140+
- ✅ Signed commits
141+
1142
## Commits
2143

3144
All commits should be signed to enhance security, authorship, trust and compliance.
@@ -22,13 +163,13 @@ npm version patch --no-git-tag-version
22163
npm version prerelease --preid beta --no-git-tag-version
23164
```
24165

25-
## Publishing
166+
## Getting Help
26167

27-
Publishing to NPM has 2 different processes. Production process is automated by creating a git tag on master.
168+
- **Documentation**: Check the [docs/](./docs/) directory for detailed guides
169+
- **Issues**: Search [existing issues](https://github.com/auth0/auth0-deploy-cli/issues) before creating new ones
170+
- **Community**: Visit the [Auth0 Community](https://community.auth0.com/) for general questions
171+
- **Security**: Report security vulnerabilities through [Auth0's responsible disclosure program](https://auth0.com/responsible-disclosure-policy)
28172

29-
Publishing the beta should be done manually:
173+
## Code of Conduct
30174

31-
```sh
32-
npm run build
33-
npm publish --tag beta
34-
```
175+
This project follows [Auth0's Code of Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md). By participating, you agree to uphold this code.

0 commit comments

Comments
 (0)