alstr / todo-to-issue-action

Action that converts TODO comments to GitHub issues on push.
MIT License
603 stars 115 forks source link

Feature: Update TODO with link to created Issue #199

Open tomek-i opened 2 weeks ago

tomek-i commented 2 weeks ago

Praise: This workflow is amazing and I really love it. Just recently came across this and have been plying around a little.

In the teams I am working with, we use a fairly strict process in terms on PRs and code reviews and if the code change contains any TODO comments without any link to an issue then we flag it / reject the PR.

What would be fantastic is if the workflow, once the ISSUE is created updates the TODO with a link to the issue eg:

// BEFORE

// TODO: need to update this example
const test = () => console.log("test")

// AFTER

// TODO: https://github.com/<username>/<repo-name>/issue/25 need to update this example
const test = () => console.log("test")

// ALTERNATIVE

// TODO: need to update this example
// https://github.com/<username>/<repo-name>/issue/25
const test = () => console.log("test")
alstr commented 2 weeks ago

Sounds good in theory. With it having to modify the files I'm not sure how best to go about that. That would be the main challenge.

tomek-i commented 2 weeks ago

Sounds good in theory. With it having to modify the files I'm not sure how best to go about that. That would be the main challenge.

I'm just thinking out loud, I haven't looked much into the access permisisons etc from workflows etc and if its even possible or not.

I have seen with the CodiumAI Agent on button press it can create a code suggestion/commit on gh, perhaps something along that could be used to write back the issue number?

Below is an example from CodiumAI Agent adding some code improvement suggestions on the PR. Once you click the checkbox the agent will create a code suggestion on the PR that you can then commit image

An here is the code change request from the bot that you can then edit/decline/commit: image