Skip to content

Commit d9f8da7

Browse files
authored
Document new URL format for PR and issue IDs (#125)
1 parent bed4098 commit d9f8da7

File tree

4 files changed

+22
-21
lines changed

4 files changed

+22
-21
lines changed

docs/getting-started.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,18 @@ summary:
4747
# Affected component; a word indicating the component this changeset affects.
4848
component:
4949

50-
# PR number; optional; the PR number that added the changeset.
50+
# PR URL; optional; the PR number that added the changeset.
5151
# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added.
5252
# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number.
5353
# Please provide it if you are adding a fragment for a different PR.
54-
#pr: 1234
54+
#pr: https://github.com/owner/repo/1234
5555

56-
# Issue number; optional; the GitHub issue related to this changeset (either closes or is part of).
56+
# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of).
5757
# If not present is automatically filled by the tooling with the issue linked to the PR number.
58-
#issue: 1234
59-
60-
# Repository URL; optional; the repository URL related to this changeset and pr and issue numbers.
61-
# If not present is automatically filled by the tooling based on the repository this file has been committed in.
62-
#repository: https://github.com/elastic/elastic-agent-changelog-tool
58+
#issue: https://github.com/owner/repo/1234
6359
```
6460

65-
Ensure `kind` is correct and fill the `summary` field with a brief description. You can ignore `component`, but you must set `pr`, `issue` and `repository` manually, the logic to fill them automatically is still work in progress.
61+
Ensure `kind` is correct and fill the `summary` field with a brief description.
6662

6763
Save and close the file.
6864

@@ -82,8 +78,10 @@ entries:
8278
- summary: Add Changelog Fragment creation
8379
description: ""
8480
kind: feature
85-
pr: 13
86-
issue: 21
81+
pr:
82+
- https://github.com/elastic/elastic-agent-changelog-tool/pull/13
83+
issue:
84+
- https://github.com/elastic/elastic-agent-changelog-tool/issues/21
8785
timestamp: 1649924282
8886
file:
8987
name: 1649924282-changelog-fragment-creation.yaml

docs/release-process.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ Support is achieved through:
3737
[Releases]: https://github.com/elastic/elastic-package/releases
3838
[reproducible builds]: https://reproducible-builds.org/
3939
[source epoch]: https://reproducible-builds.org/docs/source-date-epoch/
40-
[gorel-docs]: https://goreleaser.com/customization/build/#reproducible-builds
40+
[gorel-docs]: https://goreleaser.com/customization/build/#reproducible-builds

internal/changelog/fragment/creator_internal_test.go

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,19 @@ summary: foobar
9494
# Affected component; a word indicating the component this changeset affects.
9595
component:
9696
97-
# PR number; optional; the PR number that added the changeset.
97+
# PR URL; optional; the PR number that added the changeset.
9898
# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added.
9999
# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number.
100100
# Please provide it if you are adding a fragment for a different PR.
101-
#pr: 1234
101+
#pr: https://github.com/owner/repo/1234
102102
103-
# Issue number; optional; the GitHub issue related to this changeset (either closes or is part of).
103+
# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of).
104104
# If not present is automatically filled by the tooling with the issue linked to the PR number.
105-
#issue: 1234
105+
#issue: https://github.com/owner/repo/1234
106106
`
107107
got := string(content)
108-
assert.Equal(t, expected, got)
108+
assert.Equal(t, expected, got, `This test exists to force review on changes to the Changelog Fragment template, as changing the template may introduce breaking changes.
109+
This test is here to double check and confirm the choice of changing it. If the change introduce a breaking change, make sure to create a proper upgrade path for users.
110+
If you changed the template and this test break, you know why.
111+
`)
109112
}

internal/changelog/fragment/template.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ summary: {{.Summary}}
2020
# Affected component; a word indicating the component this changeset affects.
2121
component:
2222

23-
# PR number; optional; the PR number that added the changeset.
23+
# PR URL; optional; the PR number that added the changeset.
2424
# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added.
2525
# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number.
2626
# Please provide it if you are adding a fragment for a different PR.
27-
#pr: 1234
27+
#pr: https://github.com/owner/repo/1234
2828

29-
# Issue number; optional; the GitHub issue related to this changeset (either closes or is part of).
29+
# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of).
3030
# If not present is automatically filled by the tooling with the issue linked to the PR number.
31-
#issue: 1234
31+
#issue: https://github.com/owner/repo/1234

0 commit comments

Comments
 (0)