You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add requirement and detection that breaking changes are explained in release notes (#586)
* add requirement and detection that breaking changes are explained in release notes
* add unit tests
* fix get_release_notes
* look up the PR at guideline check time to protect against slow labelling
* Update src/AutoMerge/guidelines.jl
Co-authored-by: Eric Hanson <[email protected]>
* accommodate unit tests
* make it opt-in in `run`
* tryfix
* fix
* expand message with example
* indent?
* refactor and fix indentation
* update reference tests
* add more details and include JuliaHub
* Update Project.toml
---------
Co-authored-by: Eric Hanson <[email protected]>
Copy file name to clipboardExpand all lines: src/AutoMerge/guidelines.jl
+72-1Lines changed: 72 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -322,6 +322,74 @@ function meets_name_match_check(
322
322
return (true, "")
323
323
end
324
324
325
+
# This check checks for an explanation of why a breaking change is breaking
326
+
const guideline_breaking_explanation =Guideline(;
327
+
info ="Release notes have not been provided that explain why this is a breaking change.",
328
+
docs ="If this is a breaking change, release notes must be given that explain why this is a breaking change (i.e. mention \"breaking\"). To update the release notes, please see the \"Providing and updating release notes\" subsection under \"Additional information\" below.",
<details><summary>Example of adding release notes with breaking notice</summary>
341
+
342
+
If you are using the comment bot `@JuliaRegistrator`, you can add release notes to this registration by re-triggering registration while specifying release notes:
343
+
344
+
```
345
+
@JuliaRegistrator register
346
+
347
+
Release notes:
348
+
349
+
## Breaking changes
350
+
351
+
- Explanation of breaking change, ideally with upgrade tips
352
+
- ...
353
+
```
354
+
355
+
If you are using JuliaHub, trigger registration the same way you did the first time, but enter release notes that specify the breaking changes.
356
+
</details>
357
+
"""
358
+
if has_release_notes
359
+
return"""
360
+
This is a breaking change, but no release notes have been provided. Please add release notes that explain the breaking change.
361
+
$(example_detail)
362
+
"""
363
+
else
364
+
return"""
365
+
This is a breaking change, but the release notes do not mention it. Please add a mention of the breaking change to the release notes.
Copy file name to clipboardExpand all lines: src/AutoMerge/public.jl
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,7 @@ Run the `RegistryCI.AutoMerge` service.
31
31
- `registry_deps`: list of registry dependencies, e.g your packages may depend on `General`.
32
32
- `api_url`: the registry host API URL, default is `"https://api.github.com"`.
33
33
- `check_license`: check package has a valid license, default is `false`.
34
+
- `check_breaking_explanation`: Check whether the PR has release notes (collected via Registrator.jl) with a breaking change explanation, default is `false`.
34
35
- `public_registries`: If a new package registration has a UUID that matches
35
36
that of a package already registered in one of these registries supplied here
36
37
(and has either a different name or different URL) then an error will be thrown.
Copy file name to clipboardExpand all lines: test/reference_comments/comment_pass_false_type_new_package_suggest_onepointzero_false_version_0.1.0_point_to_slack_false.md
+40Lines changed: 40 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,46 @@ Please make sure that you have read the [package naming guidelines](https://juli
29
29
30
30
</details>
31
31
32
+
- This is a breaking change, but no release notes have been provided. Please add release notes that explain the breaking change.
33
+
<details><summary>Example of adding release notes with breaking notice</summary>
34
+
35
+
If you are using the comment bot `@JuliaRegistrator`, you can add release notes to this registration by re-triggering registration while specifying release notes:
36
+
37
+
```
38
+
@JuliaRegistrator register
39
+
40
+
Release notes:
41
+
42
+
## Breaking changes
43
+
44
+
- Explanation of breaking change, ideally with upgrade tips
45
+
- ...
46
+
```
47
+
48
+
If you are using JuliaHub, trigger registration the same way you did the first time, but enter release notes that specify the breaking changes.
49
+
</details>
50
+
51
+
52
+
- This is a breaking change, but the release notes do not mention it. Please add a mention of the breaking change to the release notes.
53
+
<details><summary>Example of adding release notes with breaking notice</summary>
54
+
55
+
If you are using the comment bot `@JuliaRegistrator`, you can add release notes to this registration by re-triggering registration while specifying release notes:
56
+
57
+
```
58
+
@JuliaRegistrator register
59
+
60
+
Release notes:
61
+
62
+
## Breaking changes
63
+
64
+
- Explanation of breaking change, ideally with upgrade tips
65
+
- ...
66
+
```
67
+
68
+
If you are using JuliaHub, trigger registration the same way you did the first time, but enter release notes that specify the breaking changes.
Copy file name to clipboardExpand all lines: test/reference_comments/comment_pass_false_type_new_package_suggest_onepointzero_false_version_0.1.0_point_to_slack_true.md
+40Lines changed: 40 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,46 @@ Please make sure that you have read the [package naming guidelines](https://juli
29
29
30
30
</details>
31
31
32
+
- This is a breaking change, but no release notes have been provided. Please add release notes that explain the breaking change.
33
+
<details><summary>Example of adding release notes with breaking notice</summary>
34
+
35
+
If you are using the comment bot `@JuliaRegistrator`, you can add release notes to this registration by re-triggering registration while specifying release notes:
36
+
37
+
```
38
+
@JuliaRegistrator register
39
+
40
+
Release notes:
41
+
42
+
## Breaking changes
43
+
44
+
- Explanation of breaking change, ideally with upgrade tips
45
+
- ...
46
+
```
47
+
48
+
If you are using JuliaHub, trigger registration the same way you did the first time, but enter release notes that specify the breaking changes.
49
+
</details>
50
+
51
+
52
+
- This is a breaking change, but the release notes do not mention it. Please add a mention of the breaking change to the release notes.
53
+
<details><summary>Example of adding release notes with breaking notice</summary>
54
+
55
+
If you are using the comment bot `@JuliaRegistrator`, you can add release notes to this registration by re-triggering registration while specifying release notes:
56
+
57
+
```
58
+
@JuliaRegistrator register
59
+
60
+
Release notes:
61
+
62
+
## Breaking changes
63
+
64
+
- Explanation of breaking change, ideally with upgrade tips
65
+
- ...
66
+
```
67
+
68
+
If you are using JuliaHub, trigger registration the same way you did the first time, but enter release notes that specify the breaking changes.
0 commit comments