mirror of
https://github.com/badges/shields.git
synced 2025-04-18 19:44:04 +03:00
Update Contributing documentation on PRs/service tests & amending history (#6128)
* docs: update contributing info on PRs/tests & amending history * docs: include git config links Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
This commit is contained in:
parent
e5e304a031
commit
806c52bdd6
7
.github/pull_request_template.md
vendored
Normal file
7
.github/pull_request_template.md
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
<!--
|
||||
Be sure to review our Contributing guidelines to help streamline the merging of your PR!
|
||||
|
||||
* PR title conventions - https://github.com/badges/shields/blob/master/CONTRIBUTING.md#running-service-tests-in-pull-requests
|
||||
* Code formatting - https://github.com/badges/shields/blob/master/CONTRIBUTING.md#prettier
|
||||
* Merge processes and reminders - https://github.com/badges/shields/blob/master/CONTRIBUTING.md#pull-requests
|
||||
-->
|
@ -131,13 +131,7 @@ Prettier before a commit by default.
|
||||
|
||||
### Tests
|
||||
|
||||
When adding or changing a service [please write tests][service-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 adding or changing a service [please write tests][service-tests], and ensure the [title of your Pull Requests follows the required conventions](#running-service-tests-in-pull-requests) to ensure your tests are executed.
|
||||
When changing other code, please add unit tests.
|
||||
|
||||
To run the integration tests, you must have redis installed and in your PATH.
|
||||
@ -153,3 +147,35 @@ There is a [High-level code walkthrough](doc/code-walkthrough.md) describing the
|
||||
### Logos
|
||||
|
||||
We have [documentation for logo usage](doc/logos.md) which includes [contribution guidance](doc/logos.md#contributing-logos)
|
||||
|
||||
## Pull Requests
|
||||
|
||||
All code changes are incorporated via pull requests, and pull requests are always squashed into a single commit on merging. Therefore there's no requirement to squash commits within your PR, but feel free to squash or restructure the commits on your PR branch if you think it will be helpful. PRs with well structured commits are always easier to review!
|
||||
|
||||
Because all changes are pulled into the main branch via squash merges from PRs, we do **not** support overwriting any aspects of the git history once it hits our main branch. Notably this means we do not support amending commit messages, nor adjusting commit author information once merged.
|
||||
|
||||
Accordingly, it is the responsibility of contributors to review this type of information and adjust as needed before marking PRs as ready for review and merging.
|
||||
|
||||
You can review and modify your local [git configuration][git-config] via `git config`, and also find more information about amending your commit messages [here][amending-commits].
|
||||
|
||||
[git-config]: https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration
|
||||
[amending-commits]: https://docs.github.com/en/github/committing-changes-to-your-project/changing-a-commit-message#rewriting-the-most-recent-commit-message
|
||||
|
||||
### Running service tests in pull requests
|
||||
|
||||
The affected service names must be included in square brackets in the pull request title so that the CI engine will run those service tests. When a pull request affects multiple services, they should be separated with spaces. The test runner is case-insensitive, so they should be capitalized for readability.
|
||||
|
||||
For example:
|
||||
|
||||
- **[Travis] Fix timeout issues**
|
||||
- **[Travis Sonar] Support user token authentication**
|
||||
- **Add tests for [CRAN] and [CPAN]**
|
||||
|
||||
Note that many services are part of a "family" of related services. Depending on the changes in your PR you may need to run the tests for just a single service, or for _all_ the services within a family.
|
||||
|
||||
For example, a PR title of **[GitHubForks] Foo** will only run the service tests specifically for the GitHub Forks badge, whereas a title of **[GitHub] Foo** will run the service tests for all of the GitHub badges.
|
||||
|
||||
In the rare case when it's necessary to see the output of a full service-test
|
||||
run in a PR (all 2,000+ tests), include `[*****]` in the title. Unless all the tests pass, the build
|
||||
will fail, so likely it will be necessary to remove it and re-run the tests
|
||||
before merging.
|
||||
|
@ -260,21 +260,9 @@ npm run coverage:report:open
|
||||
|
||||
## Pull requests
|
||||
|
||||
The affected service ids should be included in square brackets in the pull request
|
||||
title. That way, Circle CI will run those service tests. When a pull request
|
||||
affects multiple services, they should be separated with spaces. The test
|
||||
runner is case-insensitive, so they should be capitalized for readability.
|
||||
Pull requests must follow the [documented conventions][pr-conventions] in order to execute the correct set of service tests.
|
||||
|
||||
For example:
|
||||
|
||||
- [Travis] Fix timeout issues
|
||||
- [Travis Sonar] Support user token authentication
|
||||
- Add tests for [CRAN] and [CPAN]
|
||||
|
||||
In the rare case when it's necessary to see the output of a full service-test
|
||||
run in a PR, include `[*****]` in the title. Unless all the tests pass, the build
|
||||
will fail, so likely it will be necessary to remove it and re-run the tests
|
||||
before merging.
|
||||
[pr-conventions]: https://github.com/badges/shields/blob/master/CONTRIBUTING.md#running-service-tests-in-pull-requests
|
||||
|
||||
## Getting help
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user