Re:Beyond the Code: Mining Self-Admitted Technical Debt in I...
by gravypod on Sunday April 19, 2020 @10:11AM
(#22916019)
That's neat. I never knew this existed. Unfortunately I mainly use Gitlab wherever I work.
Re:Beyond the Code: Mining Self-Admitted Technical Debt in I...
by gbear605 on Sunday April 19, 2020 @11:03AM
(#22916342)
I don’t know much about git hooks, but I think that it would be fairly simple to wrote a small one that parses the changes for the todo comment and then calls to Gitlab’s API. Double points for closing the ticket if the todo comment is removed.
Re:Beyond the Code: Mining Self-Admitted Technical Debt in I...
by deadbunny on Sunday April 19, 2020 @11:42AM
(#22916615)
You could probably do it with a Gitlab CI step + python (or whatever language of choice) script as well.
Re:Beyond the Code: Mining Self-Admitted Technical Debt in I...
by gravypod on Sunday April 19, 2020 @11:04AM
(#22916349)
Doing it client side might make it hard to do things like accepting MRs from forks.
Re:Beyond the Code: Mining Self-Admitted Technical Debt in I...
by antsar on Sunday April 19, 2020 @11:38AM
(#22916585)
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.
Re:Beyond the Code: Mining Self-Admitted Technical Debt in I...
by gravypod on Sunday April 19, 2020 @11:44AM
(#22916621)
It's unfortunate gitlab is built as a monolith. I'd be very capable of writing the code for implementing such a feature myself if gitlab had a first class API. The code, as we all know, would look something like this:
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.
Re:Beyond the Code: Mining Self-Admitted Technical Debt in I...
by samanthalee233 on Monday April 20, 2020 @04:33PM
(#22928186)
Hey there, I'm a GitLab community advocate, just wanted to thank you for brining attention to this issue, our team commented to get the conversation moving today:
https://gitlab.com/gitlab-org/gitlab/-/issues/14259#note_327...
https://github.com/marketplace/todo is one of them.