forked from alstr/todo-to-issue-action
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add test to track additional bugs
Several related bugs that stem from a diff that contains both deletions and additions. Specifically, the line numbers aren't counted correctly, leading to - issue URL can't be inserted because it can't find the right line in the latest file - generated issue references the wrong line number - closed issue references the wrong line number See GitHub issue alstr#236 The last item might not have any actual impact as (I think) it's just informational. But it'd still be better if it reported the correct line number of the deletion, which necessarily has to be relative to the _old_ file's line number, not the updated file's. As there is no solution in place yet for these bugs, the unittest is marked as an expected failure
- Loading branch information
Showing
3 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/example_file.py b/example_file.py | ||
index 6b0c6cf..b37e70a 100644 | ||
@@ -1,3 +1,9 @@ | ||
+def imaginative_string(): | ||
+ return 'figment of my imagination' | ||
+ | ||
def hello_world(): | ||
- # TODO: Come up with a more imaginative greeting | ||
- print('Hello world') | ||
\ No newline at end of file | ||
+ print(f'Hello {imaginative_string()}') | ||
+ | ||
+ # TODO: Do more stuff | ||
+ # This function should probably do something more interesting | ||
+ # labels: help wanted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
diff --git a/example_file.py b/example_file.py | ||
new file mode 100644 | ||
index 0000000..525e25d | ||
--- /dev/null | ||
+++ b/example_file.py | ||
@@ -0,0 +1,3 @@ | ||
+def hello_world(): | ||
+ # TODO: Come up with a more imaginative greeting | ||
+ print('Hello world') | ||
\ No newline at end of file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters