-
Notifications
You must be signed in to change notification settings - Fork 17
docs: add CONTRIBUTING.md and align README structure with repo #293
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
Open
tejeshvenkat
wants to merge
2
commits into
OWASP-BLT:main
Choose a base branch
from
tejeshvenkat:docs/contributing-and-readme-accuracy
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+86
−24
Open
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| # Contributing to BLT-Leaf | ||
|
|
||
| Thanks for helping improve **BLT-Leaf**, the OWASP BLT PR readiness checker. | ||
|
|
||
| ## Before you start | ||
|
|
||
| - Read the [README](README.md) for features and architecture. | ||
| - Optional deep dives: [docs/OAUTH_SETUP.md](docs/OAUTH_SETUP.md), [docs/DATABASE.md](docs/DATABASE.md). | ||
|
|
||
| ## Local development | ||
|
|
||
| 1. **Node.js** — Use **Node 22+** where possible (matches [CI](.github/workflows/ci.yml)). | ||
| 2. **Install dependencies:** | ||
| ```bash | ||
| npm ci | ||
| ``` | ||
| 3. **Environment** — Copy `.env.example` to `.env` and configure secrets as documented in the README and OAuth guide. | ||
| 4. **D1 database** — Create `pr_tracker` and apply migrations (see README **Setup** — bash or Windows PowerShell sections). | ||
| 5. **Run the worker locally:** | ||
| ```bash | ||
| npm run dev | ||
| ``` | ||
| Open [http://localhost:8787](http://localhost:8787). | ||
|
|
||
| ## Python (worker) sanity check | ||
|
|
||
| Backend code lives under `src/`. Quick syntax check: | ||
|
|
||
| ```bash | ||
| python -m compileall src | ||
| ``` | ||
|
|
||
| (Use Python 3.11+ to align with typical Cloudflare Python Workers tooling.) | ||
|
|
||
| ## Tests | ||
|
|
||
| Same checks CI expects before opening a PR: | ||
|
|
||
| ```bash | ||
| npm test | ||
| ``` | ||
|
|
||
| Additional script in the repo: | ||
|
|
||
| ```bash | ||
| node test-sorting-security.js | ||
| ``` | ||
|
|
||
| ## Pull request workflow | ||
|
|
||
| 1. **Fork** [OWASP-BLT/BLT-Leaf](https://github.com/OWASP-BLT/BLT-Leaf) and **clone your fork**. | ||
| 2. Create a branch, e.g. `docs/...`, `fix/...`, or `feat/...`. | ||
| 3. Keep commits focused; update docs when behavior or setup changes. | ||
| 4. Open a PR against **`main`**. CI runs `npm run lint`, `npm run format:check`, `npm test`, and `npm audit`. | ||
|
|
||
| ## Getting help | ||
|
|
||
| - **OWASP Slack:** `#project-blt` | ||
| - **Issues:** [GitHub Issues](https://github.com/OWASP-BLT/BLT-Leaf/issues) | ||
|
|
||
| ## License | ||
|
|
||
| By contributing, you agree your contributions are licensed under the same terms as this project (see [LICENSE](LICENSE)). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.