mirror of
https://github.com/ditkrg/todo-to-issue-action.git
synced 2026-01-25 07:16:42 +00:00
Wrap diff in file
This commit is contained in:
4
main.py
4
main.py
@@ -6,7 +6,7 @@ import requests
|
|||||||
import re
|
import re
|
||||||
import json
|
import json
|
||||||
from time import sleep
|
from time import sleep
|
||||||
|
from io import StringIO
|
||||||
|
|
||||||
base_url = 'https://api.github.com/repos/'
|
base_url = 'https://api.github.com/repos/'
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ def main():
|
|||||||
closed_issues = []
|
closed_issues = []
|
||||||
|
|
||||||
# Read the diff file one line at a time, checking for additions/deletions in each hunk.
|
# Read the diff file one line at a time, checking for additions/deletions in each hunk.
|
||||||
with open(diff, 'r') as diff_file:
|
with StringIO(diff) as diff_file:
|
||||||
curr_file = None
|
curr_file = None
|
||||||
hunk_start = None
|
hunk_start = None
|
||||||
hunk_index = None
|
hunk_index = None
|
||||||
|
|||||||
Reference in New Issue
Block a user