...
How to write an Issue or Epic Ref
High-level rules
Every commit Either the PR body or each commit message should have at least one Issue ref or Epic ref.
If all commits relate to all Issue or Epic Ref(s), the Issue or Epic Ref(s) can be put into the PR descriptionthe PR body or in each commit.
If different commits relate to different issues or epics, then either 1) the PR body can contain a primary reference and any commits that differ need their own reference or 2) each commit needs its own issue or epic references.
Issue refs can reference either GitHub or Jira issues. Epic refs must point to Jira issues only.
Issue or Epic Refs can go anywhere in the PR body or commit message, preferably before the Release Note.
The most to least preferred reference types are:
An issue ref where the issue contains an /wiki/spaces/JIRA/pages/1925283849
An issue ref to an issue without epic link and an epic ref
An epic ref or issue ref without epic link
An
Epic: none
ref
...
If the PR relates to only one issue or Jira epic:
Put the issue or Jira epic reference either in the PR description or in each relevant commit.
If the reference is in the PR description, put “Epic
Epic:
None”None
in each commit that doesn't relate to the epic. This is particularly important if the commit contains a release note.
If the PR relates to multiple issues or Jira epics:
Put the issue or Jira epic reference in each relevant commit.
If a single commit relates to multiple Jira epics, put all relevant issue or Jira epic references in that commit.
If all commits relate to all the Jira epics, put the issue or Jira epic references in the PR description or in all of the commit messages.
Put “Epic
Epic:
None”None
in each commit that doesn't relate to any issue or epic.
If the PR relates to no issues and no Jira epics:
Preferably, put “Epic
Epic:
None”None
in the PR description or in each commit containing a release note.
...
GitHub issue numbers:
#58420
GitHub issues in other repositories:
cockroachdb/docs#14958
GitHub URLs:
https://github.com/cockroachdb/cockroach/issues/78601
Jira issue keys:
DOC-2356
Jira URLs:
https://cockroachlabs.atlassian.net/browse/DOC-5432
Supported Keywords and Key Phrases
The standard GitHub keywords for linking and closing issues are supported.
Only one issue should be included per keyword. If multiple issues are included for a keyword, GitHub will only close the first issue in the list.
Only referenced GitHub issues are closed.
Select phrases for referencing issues are supported.
Supported phrases:
Informs
See also
Part of
A list of issues may be included for each phrase.
These issues are not linked or closed.
...
Code Block |
---|
Fixes: #64276 Closed cockroachdb/pebble#482 Resolved: https://github.com/cockroachdb/cockroach/issues/77376 Informs: #33316 See also #62585, DOC-4023 Part of https://cockroachlabs.atlassian.net/browse/CRDB-13558 |
Epic Ref (Jira Epic References)
To include an epic reference, use Epic: <jira-epic-key>
or Epic: <url>
It must be on a line by itself with no whitespace before it.
Examples:
Code Block |
---|
# key-only reference: Epic: CRDB-8035 # URL reference: Epic: https://cockroachlabs.atlassian.net/browse/CRDB-8035 # if no Issue or Epic reference Epic: none |
...
This check contains logs that will print helpful information about whether the PR body and/or the commit messages are missing an issue or epic reference. The check is not required, but that may change in the future with advanced warning.
What happens if the linter fails?
In the case where this linter fails, you may receive an email about it from GitHub. If you wish to disable these emails, follow these steps:
Log in to GitHub and open up your notification settings.
Under System > Actions, disable the Email notifications.
I don't work for Cockroach Labs. How do I resolve this?
If you don't work for Cockroach labs, the person reviewing the PR will take care of resolving this for you.
How to help external contributors add issue and epic references
We will occasionally When we receive PRs from external contributors. Unfortunately, they likely won't know which issue or epic is associated with the change they are making. It is the reviewer’s reviewer's responsibility to identify the issue / epic associated with the PR.
Once you've identified the issue / epic to reference(s), you can ask them to either update the PR body with the reference or amend their commit(s) messagewith the reference(s) or the PR body with the appropriate references. If you'd like, you may let them know you made the edits.