Skip to content
This documentation applies to Codacy Self-hosted v3.0.0

For the latest updates and improvements, see the latest Cloud documentation instead.

Post-commit hooks

For Codacy to check updates in your repository (new commits and pull requests) you must have post-commit hooks enabled.

There are two ways to do this: automatically or manually

Automatic setup of post-commit hook

If you are using GitHub or Bitbucket you can let Codacy configure the hook for you. Just go to your repository settings and click on the Integrations tab. This should have a switch button for automatic setup of post-commit hooks.

Missing hook automatic setup switch button

It is possible that this switch is not visible for you. If this is your case, go to the Integrations tab and add GitHub/Bitbucket. Make sure you enable it after adding it.

Manual Setup of Post-Commit Hooks on GitHub

To turn on post-commit hooks for GitHub:

  1. Copy the Hook URL to your Clipboard.
  2. Go to Webhooks & Services under your repository settings
  3. Paste the Hook URL into the Payload URL field
  4. Select "application/json" in the Content Type field
  5. Click Add Webhook

Here's an example of how to configure your hooks on Github:

Permissions to create post-commit hooks

If you get an error when turning on the post-commit hook, please make sure you have Admin rights on the GitHub repository.

Share your feedback 📢

Did this page help you?

Thanks for the feedback! Is there anything else you'd like to tell us about this page?

We're sorry to hear that. Please let us know what we can improve:

Alternatively, you can create a more detailed issue on our GitHub repository.

Thanks for helping improve the Codacy documentation.

If you have a question or need help please contact support@codacy.com.

Last modified November 17, 2020