Earlier quoted context omitted.
That's neat. I never knew this existed. Unfortunately I mainly use Gitlab wherever I work.
There's an issue for this in GitLab's tracker: https://gitlab.com/gitlab-org/gitlab/-/issues/14259 Sadly, it's four years old and seems pretty stagnant.
for commit
diff = commit.diff
for line in diff.result
if 'todo' in line
line_id = hash(line)
if existing := issues.find(tags={'todo_id': line_id}):
existing.update(code_url = new line location)
else:
issues.create(....)
But because these APIs aren't first class a change like this requires deep knowledge of gitlab's internals and acceptance and prioritization of features from gitlab's core team.