Skip to content

Commit 2b4ae5c

Browse files
committed
Add additional safety check for diff without any changed files
1 parent 0183c02 commit 2b4ae5c

File tree

1 file changed

+4
-0
lines changed
  • src/label_doconly_changes

1 file changed

+4
-0
lines changed

src/label_doconly_changes/app.py

+4
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,10 @@ def run(self) -> int:
182182
encoding="utf-8",
183183
).splitlines()
184184

185+
if not files:
186+
self.error(None, "The base branch and merge branch are identical.")
187+
return self.exit_code
188+
185189
self._process_files(files)
186190
if self.pr_info is not None:
187191
self._update_labels()

0 commit comments

Comments
 (0)