Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore whitespace issues in upgrade notes yml #309

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions define_excluded/define_excluded.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

# Define directories usually excluded by various CI tools
excluded=".git/
.upgradenotes/*.yml
auth/cas/CAS/
admin/tool/componentlibrary/hugo/dist/css/docs.css.map
admin/tool/componentlibrary/docs/
Expand Down
32 changes: 32 additions & 0 deletions tests/fixtures/31-whitespace-upgradenotes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From d6a28ff1970f63efe4720a81c8feda8b22bdab0b Mon Sep 17 00:00:00 2001
From: Andrew Nicols <andrew@nicols.co.uk>
Date: Thu, 3 Oct 2024 23:35:55 +0800
Subject: [PATCH 1/1] Ignore whitespace issues in upgradenotes

---
.upgradenotes/MDL-81675-2024052916042539.yml | 13 +++++++++++++
1 file changed, 13 insertions(+)
create mode 100644 .upgradenotes/MDL-81675-2024052916042539.yml

diff --git a/.upgradenotes/MDL-81675-2024052916042539.yml b/.upgradenotes/MDL-81675-2024052916042539.yml
new file mode 100644
index 0000000000..ed29757e0c
--- /dev/null
+++ b/.upgradenotes/MDL-81675-2024052916042539.yml
@@ -0,0 +1,13 @@
+issueNumber: MDL-81675
+notes:
+ core_course:
+ - message: >+
+ - New optional `sectionNum` parameter has been added to `activitychooser`
+ AMD module initializer.
+
+ - New option `sectionnum` parameter has been added to
+ `get_course_content_items()` external function.
+
+ - New optional `sectionnum` parameter has been added to
+ `get_content_items_for_user_in_course()` function.
+ type: improved
--
2.42.0

12 changes: 12 additions & 0 deletions tests/illegal_whitespace.bats
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@ teardown () {
assert_output --partial "continue in best results ever"
}

@test "illegal_whitespace: failure ignored for excluded file" {
# Lets introduce a whitespace error and ensure it fails
git_apply_fixture 31-whitespace-upgradenotes.patch

ci_run illegal_whitespace/illegal_whitespace.sh
assert_success
assert_output --partial "current count: 959"
assert_output --partial "previous count: 959"
assert_output --partial "best count: 959"
assert_output --partial "continue in best results ever"
}

@test "illegal_whitespace: failure reported when whitespace error detected" {
# Lets introduce a whitespace error and ensure it fails
git_apply_fixture 31-whitespace-error.patch
Expand Down
Loading