diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2026-06-22 18:54:05 +0300 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2026-06-22 18:54:05 +0300 |
| commit | f997b5aa52f41749d3d011c089969592154e2de4 (patch) | |
| tree | 40b18f20cd62c8fec5adaf3fa91ee745bbd1e7aa | |
| parent | 63bb470241bff43d7f59c8c1d3a937c558abe097 (diff) | |
| download | the-epube-f997b5aa52f41749d3d011c089969592154e2de4.tar.gz the-epube-f997b5aa52f41749d3d011c089969592154e2de4.tar.xz | |
debug
| -rw-r--r-- | review_mr.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/review_mr.py b/review_mr.py index 4489e27..4fe5b27 100644 --- a/review_mr.py +++ b/review_mr.py @@ -437,14 +437,16 @@ def post_annotations( **pos_data, "old_path": old_path, "new_path": new_path, - "old_line": old_line, "new_line": new_line, } + if old_line is not None: + position["old_line"] = old_line payload = { "body": ann.message, "position": position, } - print(f" Posting: file={ann.file} line={ann.line} pos={position}", file=sys.stderr) + print(f" Posting: file={ann.file} line={ann.line}", file=sys.stderr) + print(f" Payload: {json.dumps(payload, indent=2)}", file=sys.stderr) result = _api_post(url, {"PRIVATE-TOKEN": token}, payload) # Check if the comment was created with a position # Discussions API returns {notes: [{position: ..., body: ...}]} |
