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

Warn about PRs that leave TODOs related to the Jira issue being fixed #267

Open
yrodiere opened this issue Aug 26, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@yrodiere
Copy link
Member

See for example hibernate/hibernate-search#2173 : it clearly attempts to fix HSEARCH-3729 (see commit messages), but left a // TODO HSEARCH-3729 in the code:

https://github.com/hibernate/hibernate-search/blob/b422fef1ca93aadf2359ce918df337f4c459ca5e/mapper/pojo-base/src/main/java/org/hibernate/search/mapper/pojo/massindexing/impl/PojoMassIndexingBatchCoordinator.java#L270-L272

Ideally, when Jira integration is enabled with the bot, and a PR is submitted, the bot would:

  1. gather the keys of all Jira issues fixed in the PR (it already does)
  2. search through the code (at the PR head) for FIXME <the issue key / TODO <the issue key
  3. if anything was found, leave a review with annotations on the relevant sections of the code, or fail a status check, or anything else that warns contributors that something seems wrong.

Note that searching simply for the issue key in the code would lead to false positives (e.g. if a test references the issue), so it's not a good idea.

@yrodiere yrodiere added the enhancement New feature or request label Aug 26, 2024
@hibernate hibernate deleted a comment Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant