When a pull request has been reviewed and approved by at least one person and all checks have passed, then it's time to merge the pull request.
Maintainers are responsible for merging all pull requests. If a maintainer has opened a pull request, then the general rule is that the same maintainer merges the pull request. If a non-maintainer has opened a pull request, then it's suggested that one of the maintainers who reviews the pull request should merge the pull request.
Consider (and ask about) the items on the following checklist before merging a pull request:
Before actually merging a pull request, consider the following things:
Before you can merge a pull request, it must have a review approval, and all the required status checks must pass.
The pull request title should be formatted according to <Area>: <Summary>
(Both "Area" and "Summary" should start with a capital letter).
Keep the summary short and understandable for the community as a whole.
All commits in a pull request are squashed when merged and the pull request title will be the default subject line of the squashed commit message. It's also used for the changelog.
Example:
Docs: Change url to URL in all documentation files
See formatting guidelines for more information.
The Grafana release process uses a bot to automatically assign pull requests to a milestone to make it easier for release managers to track changes. For example, generating changelog (release note) must be in a milestone.
That being said, you don't have to assign a milestone manually to a pull request. Instead, when it is merged and closed, a bot will then look for the most appropriate milestone and assign it to the pull request.
The bot-assigned milestone should always reflect the branch into which the pull request is merged. For example:
.x
(for example, 10.0.x
for the 10.0.x releases).main
use the .x
milestone of the next minor (or major) version (you can find that version number inside the package.json
file).9.4.x
for the v9.4.x
branch).At Grafana we generate the changelog and release notes based on merged pull requests. Including changes in the changelog (release notes) is very important to provide a relatively complete picture of what changes a Grafana release actually includes.
There's a GitHub action available in the repository named Update changelog that can be triggered manually to re-generate the changelog and release notes for any release.
Exactly what changes should be added to the changelog is hard to answer but here's some general guidance:
An active decision to include a change in the changelog needs to be taken for every pull request. There's a pull request check named Changelog Check that enforces this rule. By adding or removing labels on the pull request or updating the pull request title, description, or both, the check is re-evaluated.
If you don't want to include your change in changelog, you need to add a label named no-changelog to the pull request.
To include a pull request in the changelog, add a label named add to changelog
to the pull request. Then the following additional validation rules are checked:
Not complying with above rules can make the Changelog Check fail with validation errors.
The changelog is divided into various sections. Here's how to make a description of a pull request show up in a certain section of the release notes:
Features and enhancements:
Label the pull request with add to changelog
and any of the other section rules don't apply.
Bug fixes:
Label the pull request with add to changelog
and either label with type/bug
or the pull request title contains fix
or fixes
.
Plugin development fixes and changes:
Label the pull request with area/grafana/ui
or area/grafana/runtime
.
Deprecations:
In case the pull request introduces a deprecation you should document this. Label the pull request with add to changelog
and use the following template at the end of the pull request description to describe the deprecation change.
# Deprecation notice
<Deprecation description>
In case the pull request introduces a breaking change you should document this. Label the pull request with add to changelog
and breaking change
and use the following template at the end of the pull request description describing the breaking change:
# Release notice breaking change
<Breaking change description>
Backporting is the process of copying the pull request into the version branch of one or multiple previous releases.
Backporting should be a rare exception, reserved only for critical bug fixes, and must be initiated by a Grafana Labs employee. We generally avoid automatic backports, as these changes carry some risk: they typically receive less manual testing than changes included in regular point releases.
If a pull request addresses a critical bug and backporting is warranted, a Grafana Labs team member can apply the appropriate backport vx.x
labels for the relevant release branches. The team will review and approve the backport before proceeding. When the pull request is merged, seperate backport PRs will automatically be creataed.
We aim to ensure that we don't backport pull requests unnecessarily. The only scenarios for backporting are typically pull requests that address bugs, have a product approval, or refer to documentation changes.
Backport labels need to be followed by either:
type/bug
label: Pull requests which address bugsproduct-approved
label: Urgent fixes which need product approval, in order to get mergedtype/docs
label: Docs changestype/ci
label: Changes to the CI automationNote: You can still backport a pull request after it's been merged.
The best time to actually merge the pull request varies from case to case. All commits in a pull request are squashed.
You can change the commit message before merging. Please remember that developers might use the commit information for tasks like reviewing changes of files, doing Git blame, and resolving merge conflicts.
While there aren't formal best practices around this process, you can consider the following guidance:
Do:
Co-authored-by:
lines as is so that co-authors are credited for the contribution.Consider:
To finalize the merge, click the Confirm squash and merge button.
Make sure to close any referenced or related issues. We recommend that you assign the same milestone on the issues that the pull request fixes or closes, but this isn't required.
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )