I developed this for #820 to provide the correct cache behavior when a service wants to use custom parameters from the query string. For safety, only the declared parameters (and the global parameters) are provided to the service. Consequently, failure to declare a parameter results in the parameter not working at all (undesirable, but easy to debug) rather than indeterminate behavior that depends on the cache state (undesirable, but hard to debug).
3.3 KiB
Contributing to Shields
Shields is a community project. We invite your participation through issues and pull requests!
Ways you can help
Contributing code
This project has quite a backlog of suggestions! If you're new to the project, maybe you'd like to open a pull request to address one of them:
Or you can adopt one of these pull requests:
Contributing documentation
You can help by improving the project's usage and developer instructions.
Helping others
You can monitor issues and the chat room, and help other people who have questions about contributing to Shields, or using it for their projects.
Suggesting improvements
There are a lot of suggestions on file. You can help by weighing in on these suggestions, which helps convey community need to other contributors who might pick them up.
There is no need to post a new comment. Just add a 👍 or ❤️ to the top post.
If you have a suggestion of your own, search the open issues and if you don't see it, feel free to open a new issue.
Getting help
There are three places to get help:
- If you're new to the project, a good place to start is the tutorial.
- If you need help getting started or implementing a change, feel free to open an issue with your question.
- You can also join the chat room and ask your question there.
Badge guidelines
- The left-hand side of a badge should not advertize. It should be a noun describing succinctly the meaning of the right-hand-side data.
- New query parameters must be declared by the service. See
request-handler.js. - The format of new badges should be of the form
/VENDOR/SUBVENDOR-BADGE-SPECIFIC/PARAMETERS.format. For instance,https://img.shields.io/gitter/room/nwjs/nw.js.svg. The vendor is gitter, the badge is for rooms, the parameter is nwjs/nw.js, and the format is svg. - Except for badges using the
socialstyle, logos should be turned off by default.
Coding guidelines
Tests
When adding or changing a service please write tests.
When opening a pull request, include your service name in brackets in the pull request title. That way, those service tests will run in CI.
e.g. [Travis] Fix timeout issues
When changing other code, please add unit tests.
Code organization
Function declarations are placed in lib/, not directly in server.js.
Logos
Please minimize checked-in SVG files through SVGO. You can use svgomg.