Interacting with Sourcery
In GitHub or GitLab you can interact with Sourcery by commenting @sourcery-ai
with specific commands or by replying to a Sourcery comment
Triggering Sourcery Reviews¶
On any pull request you can comment @sourcery-ai review to trigger a new
review from Sourcery.
You can use this on old PRs that were opened before Sourcery was installed to get an initial review on them or use it to trigger a re-review from Sourcery after you address its initial comments.
Generating a PR Title¶
In the title of a pull request you can add in @Sourcery and Sourcery will
automatically generate a PR title based on the contents of the pull request.
Alternatively you can comment @sourcery-ai title in the PR.
Generating a Review Summary¶
Comment @sourcery-ai summary on a pull request to generate Sourcery's summary
of changes.
Generating a Review Guide¶
Comment @sourcery-ai guide to create a new review guide on the pull request
based on the changes in the PR.
Dismissing & Resolving Sourcery Comments¶
To dismiss all of the outstanding comments from Sourcery you can comment
@sourcery-ai dismiss. To resolve all of the comments comment
@sourcery-ai resolve.
Generating a GitHub Issue¶
If you would like Sourcery to turn one of its comments into a GitHub issue you
can reply to a Sourcery comment with @sourcery-ai issue and Sourcery will set
up an issue for you to address in the future.
Responding to a Sourcery Comment¶
You can reply to any comment Sourcery to ask questions or clarification, get advice on how to solve an issue, or to tell Sourcery that you don't want to or shouldn't make the suggested change.
If you have tagged another developer in a reply to one of Sourcery's comments,
Sourcery should ignore you to allow that conversation to go on uninterrupted. If
you'd like to bring Sourcery back into the conversation, simply tag
@sourcery-ai in the comment thread.
Giving Sourcery Feedback¶
On any comment from Sourcery there is a thumbs up and thumbs down emoji automatically attached. If you like the comment or find it useful, add another thumbs up emoji. If you find it unhelpful or incorrect you can add another thumbs down emoji.
Sourcery will take the reactions you make to comments and use those to tailor future comments on your reviews. It will look to make more comments similar to those you have added thumbs up to in the past and fewer similar to those that you have added thumbs down to.