Skip to content

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

Open
@yrodiere

Description

@yrodiere

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions