Skip to content

Commit

Permalink
docs: Fix commit-log.rst after JIRA switch
Browse files Browse the repository at this point in the history
There are some changes to the workflow:
- We don't support links in summary lines anymore
- Conflicts is not supported anymore
- Reverts is new supported action
  • Loading branch information
jkonecny12 committed Dec 8, 2023
1 parent 9067f9e commit cf43cfb
Showing 1 changed file with 18 additions and 34 deletions.
52 changes: 18 additions & 34 deletions docs/commit-log.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,13 @@ git commit messages for anaconda should follow a consistent format. The
following are rules to follow when committing a change to the git repo:

1) The first line of the commit message should be a short summary of the
change in the patch. We also place (#BUGNUMBER) at the end of this
line to indicate the bugzilla.redhat.com bug number addressed in this
patch. The bug number is optional since there may be no bug number,
but if you have one you are addressing, please include it on the
summary line. Lastly, the summary lines need to be short. Ideally
less than 75 characters, but certainly not longer than 80.
change in the patch. The summary lines need to be short.
Ideally less than 75 characters, but certainly not longer than 80.

Here are acceptable first lines for git commit messages::
Here is acceptable first line for git commit message::

Check partition and filesystem type on upgrade (#123456)
Fix bootloader configuration setup on ppc64 (#987654)
Introduce a new screen for setting your preferred email client

The last one would be a new feature that we didn't have a bug number
for.

2) The main body of the commit message should begin TWO LINES below the
summary line you just entered (that is, there needs to be a blank line
between the one line summary and the start of the long commit message).
Expand All @@ -30,34 +21,27 @@ following are rules to follow when committing a change to the git repo:
wrap long lines. If you don't, the 'git log' output ends up looking
stupid on 80 column terminals.

3) For RHEL bugs, all commits need to reference a bug number. You may
follow one of two formats for specifying the bug number in a RHEL commit.

a) Put the bug number on the summary line in (#BUGNUMBER) format. Bugs
listed this way are treated as 'Resolves' patches in the RHEL
universe.

b) If you have a patch that is Related to or Conflicts with another bug,
you may add those lines to the end of the long commit message in this
format::
3) For RHEL or CentOS Stream bugs, all commits need to reference a bug
issue name. These bugs can be filed
`here <https://issues.redhat.com/projects/RHEL/issues>`_.

Related: rhbz#BUGNUMBER
Conflicts: rhbz#BUGNUMBER
Resolves: rhbz#BUGNUMBER
If you have a patch that is Related to or Reverts another bug,
you may add those line to the end of the long commit message in this
format::

These entries should come at the end of the long commit message and
must follow the format above. You may have as many of these lines as
appropriate for the patch.
Related: RHEL-ISSUENUMBER
Reverts: RHEL-ISSUENUMBER
Resolves: RHEL-ISSUENUMBER

c) Patches that are 'Resolves' patches have two methods to specify the
bug numbers, but Related and Conflicts can only be listed in the long
commit message.
These entries should come at the end of the long commit message and
must follow the format above. You may have as many of these lines as
appropriate for the patch.

On RHEL branches, the 'bumpver' process will verify that each patch for
the release references a RHEL bug number. The scripts/makebumpver script
will extract the bug numbers from RHEL branch commits and do two things.
the release references a RHEL issue. The scripts/makebumpver script
will extract the bug issues from RHEL branch commits and do two things.
First, it verifies that the bug referenced is a RHEL bug and in correct
states. Second, it adds the appropriate Resolves/Related/Conflicts line
states. Second, it adds the appropriate Resolves/Related/Reverts line
to the RPM spec file changelog.

It is recommended to use the pre-push hook checking commit messages for RHEL bug
Expand Down

0 comments on commit cf43cfb

Please sign in to comment.