Every contribution to Grafana's software begins with a pull request. This document guides you through the process of creating a PR.
We know you're excited to create your first pull request. Before we get started, read these resources first:
If this is your first time contributing to an open-source project on GitHub, make sure you read GitHub's article on creating a pull request.
To increase the chance of having your pull request accepted, make sure your pull request follows these guidelines:
If the pull request fixes a bug:
Closes #<issue number>
or Fixes #<issue number>
.Pull requests for frontend contributions must:
any
or {}
without reason.Pull requests for Redux contributions must:
actionCreatorFactory
and reducerFactory
helpers instead of traditional switch statement reducers in Redux. Refer to Redux framework for more details.reducerTester
to test reducers. Refer to Redux framework for more details.Pull requests that add or modify unit tests that are written in Jest must adhere to these guidelines:
Pull requests that create new UI components or modify existing ones must adhere to the following accessibility guidelines:
Before submitting pull requests that introduce accessibility (a11y) errors, refer to the accessibility guidelines.
We make use of a tool called Betterer in order to drive long-running code quality improvements. Our intention is for this requirement to be as unintrusive as possible; however, there are some things to be aware of:
.betterer.results
file automatically added to your commits.git commit --no-verify
. All errors will eventually have to be fixed before your code can be merged because...Unexpected changes detected in these tests while running in CI mode
. To resolve the error, merge with the target branch (usually main
)..betterer.results
file. To resolve, merge with the target branch (usually main
), and then run yarn betterer:merge
and commit.Refer to the backend style guidelines.
Once you've created a pull request, the next step is to have someone review your change. A review is a learning opportunity for both the reviewer and the author of the pull request.
If you think a specific person needs to review your pull request, then you can tag them in the description or in a comment. To tag a user on GitHub, go to Reviewers box on the Conversations page and enter the @
symbol followed by their GitHub username.
We recommend that you read How to do a code review to learn more about code reviews.
A well-written pull request minimizes the time to get your change accepted. The following guidelines help you to write good commit messages and descriptions for your pull requests.
Grafana uses the guidelines for commit messages outlined in the article How to Write a Git Commit Message, with the following additions:
The area refers to a specific part of Grafana's codebase. It should be given in the upper camel case format. For example: UpperCamelCase.
Prefer using one of the following areas:
For changes to data sources, the area is the name of the data source. For example, AzureMonitor, Graphite, or Prometheus.
For changes to panels, the area is the name of the panel, suffixed with Panel. For example, GraphPanel, SinglestatPanel, or TablePanel.
Examples of good commit messages
Build: Support publishing MSI to grafana.com
Explore: Add Live option for supported data sources
GraphPanel: Fix legend sorting issues
Docs: Change url to URL in all documentation files
If you're unsure, see the existing changelog for inspiration or guidance.
The pull request title should be formatted according to <Area>: <Summary>
(Both "Area" and "Summary" should start with a capital letter).
The Grafana team squashes all commits into one when we accept a pull request. The title of the pull request becomes the subject line of the squashed commit message. We still encourage contributors to write informative commit messages, as they become a part of the Git commit body.
We use the pull request title when we generate change logs for releases. As such, we strive to make the title as informative as possible.
Example:
Docs: Change url to URL in all documentation files
If your pull request includes configuration changes, all the following files must be changed correspondingly:
conf/defaults.ini
conf/sample.ini
docs/sources/administration/configuration.md
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )