Skip to content

Commit 2978d64

Browse files
jmcarpdrnic
authored andcommitted
Clarify docs and tests around empty text files. (#50)
Before #47, setting `text_file` to an empty or missing file resulted in no notification being sent. After #47, setting `text_file` to an empty file continued to result in no notification, but setting to an empty file sent a notification. This patch updates docs and tests to clarify the current expected behavior around empty and missing text files.
1 parent 8a196a6 commit 2978d64

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ the following will be sent under these conditions:
112112
- `text_file` omitted, or present but file missing
113113
* `$TEXT_FILE_CONTENT` is replaced with "*(no notification given)*"
114114
- `text_file` specified and present but file empty:
115-
* `$TEXT_FILE_CONTENT` is replaced with empty string.
115+
* no notification is sent
116116

117117
Optional:
118118

test/combined_text_template_and_file_missing.out

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"text_file": "sample-missing.txt",
44
"text": ":some_emoji:<https://my-ci.my-org.com/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME|Alert!>\n$TEXT_FILE_CONTENT\n",
55
"username": "concourse",
6-
"always_notify": "true",
76
"debug": "true"
87
},
98
"source": {

0 commit comments

Comments
 (0)