The OSC website is free and open source software, all contributions are welcome and appreciated so long as they comply with AGPL-3.0-or-later licensing. To expedite the submission and review process, we urge all contributors to familiarize themselves with the following contribution guidelines.
- Contribution Workflow
- Commit Messages
- Pull Requests
- Opening Issues
- Standard README
- Standard JS
- Labels
- Maintainers
Always discuss big changes by speaking with your group, by contacting a maintainer or by opening a discussion issue (see opening issues).
Suggested workflow:
- (Optional) fork the project repository.
- Checkout a new branch from
main
.- ALWAYS branch from the latest version of
main
. - Each PR/feature goes on its own branch (again, branched from
main
). This ensures that new features are not dependent on uncommitted code.
- ALWAYS branch from the latest version of
- Commit changes
- Refer to Commit Messages for writing commit messages.
- Each commit should be small and specific, don't try to push large/generic commits like "updated app" or "updated to requested changes".
- Each commit should describe a change to the code base. You can nest multiple files under a commit, as long as the message applies to both.
- Small, specific commits allow maintainers to easily revert/modify changes, keep track of versions and detect problems.
- Messed up your commit history? Its ok, maintainers are the ones ultimately responsible for maintaining messages.
- Write unit tests (if needed).
- Once you're finished making changes...
- Open a terminal and run
npm run test
to test your code. - If tests fail, it's your responsibility to fix breaking changes.
- Lint your code with
npm run fix
. This will (try to) automatically fix your code syntax for you. - Run
npm run lint
to check for any remaining syntax issues. Please fix these.
- Open a terminal and run
- Push to origin with
git push origin [your branch name]
on your terminal. - Create a pull request.
- If you've made changes to a fork, make sure you're opening a pull request to the original remote repository.
- Always open PR's on the
main
branch unless otherwise instructed. Convoluted merge histories create dependency hell and are hard to review. - Add a descriptive title and describe your changes.
- Refer to Pull Requests
- Wait for your code to be reviewed and repeat steps 3-6 for any requested changes.
Commits and commit messages should be written for each (loosely) independent change made. It goes without saying that messages should be as specific as possible - if a change can't be described in a single sentence then it probably has to be broken down into multiple commits.
Messed up your commit history? That's ok, maintainers are the ones ultimately responsible for maintaining commit messages.
That said, avoid commiting large changes all at once: messages like updated app
or fixed problem
should be broken down into their specific constituents. For example:
fixed problem
should ideally be broken up into multiple commits likefix: added missing form validation
orfix: typo
.updated app
: What exactly did you update and how did you do it? Break up each change into a commit likefeat: added form element for xyz
, orfeat: added password field
.
We recommend adding the following prefixes to your commit messages. These aren't necessary, but they keep the commit history clean-looking:
feat: ...
: For new features.docs: ...
: For adding or changing documentationci: ...
: For modifying CI, jobs or workflowsfix: ...
: For when you've fixed something.lint: ...
: For when you've fixed/changed code syntax.refactor: ...
: For when you've rewritten or reorganized something. Use this if you've moved files or created folders. This is different fromlint
because it doesn't necessarily describe syntactical changes, it describes organizational changes.- Does your specific change not apply to any of these? Use your own best judgment.
- Always discuss big changes with by speaking to your group, by contacting a maintainer or by opening a discussion issue (see opening issues). This increases the likelihood that they'll be accepted.
- Always open pull requests on the
main
branch. - Each branch and pull request should only feature 1 significant change. We might like one feature but not like the other - if they're on separate PRs we can approve/reject them easily, otherwise you'll have to do a lot of refactoring.
- Add an appropriate title. Like commit messages, your PR titles should be intuitive to understand and should give a good overview of what you've accomplished.
- Add a description. Explain what you've done and why you've done it - it might be useful to include code blocks and explain your reasoning.
- Add an appropriate title.
- Explain your proposed feature and why it might be useful.
- (Optional) Suggest an approach/method for it to be done.
- (Optional) Request to be assigned if you want to implement the proposal yourself.
- (Optional) Add the github
proposal
issue label.
- Add an appropriate title.
- Explain the bug/error you've encountered.
- Add a list of steps to reproduce the problem.
- (Optional) Add a screenshot.
- (Optional) Add the github
bug
orerror
label.
Don't open issues for typos, just fix them and create a PR.
Please ask (by replying to the conversation) before trying to fix an issue or implement a feature proposal. Don't waste your time: the issue might be outdated, someone else might already be assigned or we might be waiting for more information.
This repository adheres to the README standard style described here. Please adhere to the standard when making or requesting changes.
Maintainers are responsible for enforcement.
This repository adheres to Javascript Standard syntax described here. Contributors can run npm run lint
to list syntax issues that need to be fixed for adherence, or npm run fix
to (try to) automatically fix some of them.
Maintainers are responsible for enforcement.
Refer to this guideline on what labels to use and look for when deciding on what to contribute to.
bug/error
: Something isn't working properly.difficulty
: How hard the issue is to resolve (easy, medium, hard).discussion
: Should be discussed before moving forward.documentation
: Related to the documentation.duplicate
: It already exists.good first issue
: Friendly for beginners to work on.help wanted
: Someone is needed to work on it.priority
: How important it needs to be worked on (low, medium, high).proposal
: Brings up a new idea.question
: Requesting more information.wontfix
: Won't be worked on anymore.
- Review all PRs before merging.
- When upgrading the release version:
- Create a
BUMP X.X.X
commit message (whereX.X.X
is the version). If anyone ever wants to revert to a particular version, they can just modify the git history head to point to this commit. - The
package.json
contains a version tag, make sure it gets updated. - Create a github release.
- Create a
- Enforce Standard README style.
- Enforce unit testing: ask contributors to write unit tests and fix failing PRs.
- Enforce Javascript Standard style: ask contributors to
npm run lint
andnpm run fix
. - Enforce commit history: rebase commit messages if required.
- Discuss big changes with the group.
- Ask another maintainer to peer-review your code.