Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to access line numbers and add line comments #90

Open
tresat opened this issue Apr 13, 2023 · 5 comments
Open

Add ability to access line numbers and add line comments #90

tresat opened this issue Apr 13, 2023 · 5 comments
Labels
enhancement New feature or request roadmap

Comments

@tresat
Copy link

tresat commented Apr 13, 2023

Is your feature request related to a problem? Please describe.
It would be good to be able to get the line numbers of each changed line, be able to process the changes, and have an action available to add comments associated with a specific line to a PR.

For instance, if a PR includes a line like TODO:, I'd like to have gitStream automatically add a comment on that line in the PR saying "TODO found, did you mean to address this now?"

Describe the solution you'd like
Add line number information to the FileDiff context variable. Provide a add-comment@v2 that allows for supplying a line number argument. Associate the comment with those line numbers.

Describe alternatives you've considered
Adding comments without line numbers. Adding the content of the diff to the comment. These are not as helpful.

@BenLloydPearson
Copy link
Collaborator

Thanks for the feature request @tresat, it's super awesome to see the Gradle community giving gitStream a shot! I can't promise anything right now, but we'll keep you updated on any improvements we make that might affect this. In the meantime, feel free to make additional feature requests or bug report for things y'all are doing.

@tresat
Copy link
Author

tresat commented Apr 17, 2023

Sounds good, thank you! We're excited to be trying out the tool and will almost certainly be sending more suggestions your way as more people on our side get to see it.

@vim-zz vim-zz added the roadmap label May 23, 2023
@BenLloydPearson
Copy link
Collaborator

BenLloydPearson commented Jan 10, 2024

@tresat This should now be possible with a filter function plugin. You can pass the source.diff.files to this function and use JavaScript to both detect the presence of TODO comments and identify the line number in the response, like so:

{{ source.diff.files | myPlugin }}

Let me know if you have more questions.

@BenLloydPearson
Copy link
Collaborator

I also created a new discussion post for this idea in our new forum dedicated to gitStream plugins: #417

@BenLloydPearson
Copy link
Collaborator

I'm reopening this because I realize we only solved half of this problem and still need the ability to comment on lines of code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request roadmap
Projects
None yet
Development

No branches or pull requests

3 participants