mirror of
https://github.com/ditkrg/todo-to-issue-action.git
synced 2026-01-25 07:16:42 +00:00
Add some temporary debugging prints to understand flow
This commit is contained in:
parent
dd21bd0164
commit
6cef547381
3
main.py
3
main.py
@ -86,6 +86,7 @@ class GitHubClient(object):
|
|||||||
'Accept': 'application/vnd.github.v3.diff',
|
'Accept': 'application/vnd.github.v3.diff',
|
||||||
'Authorization': f'token {self.token}'
|
'Authorization': f'token {self.token}'
|
||||||
}
|
}
|
||||||
|
print(f"Requesting {diff_url} to get changes")
|
||||||
diff_request = requests.get(url=diff_url, headers=diff_headers)
|
diff_request = requests.get(url=diff_url, headers=diff_headers)
|
||||||
if diff_request.status_code == 200:
|
if diff_request.status_code == 200:
|
||||||
return diff_request.text
|
return diff_request.text
|
||||||
@ -626,8 +627,10 @@ if __name__ == "__main__":
|
|||||||
if len(client.commits) != 0:
|
if len(client.commits) != 0:
|
||||||
# Get the diff from the last pushed commit.
|
# Get the diff from the last pushed commit.
|
||||||
last_diff = StringIO(client.get_last_diff())
|
last_diff = StringIO(client.get_last_diff())
|
||||||
|
print(f"Got changes: {last_diff}")
|
||||||
# Parse the diff for TODOs and create an Issue object for each.
|
# Parse the diff for TODOs and create an Issue object for each.
|
||||||
raw_issues = TodoParser().parse(last_diff)
|
raw_issues = TodoParser().parse(last_diff)
|
||||||
|
print(f"Got raw issues: {raw_issues}")
|
||||||
# This is a simple, non-perfect check to filter out any TODOs that have just been moved.
|
# This is a simple, non-perfect check to filter out any TODOs that have just been moved.
|
||||||
# It looks for items that appear in the diff as both an addition and deletion.
|
# It looks for items that appear in the diff as both an addition and deletion.
|
||||||
# It is based on the assumption that TODOs will not have identical titles in identical files.
|
# It is based on the assumption that TODOs will not have identical titles in identical files.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user