Stop Vercel GitHub Comments

This stops Vercel's GitHub Bot from commenting on your PRs and commits, and so also stops the emails you get when that happens. This does not stop Vercel creating deploys for PRs and commits.

To use, add the following to your project's vercel.json, or create the file if you haven't already. Unlike some of the other Vercel Project Configuration options, this options must be added to the vercel.json even in a Next.js project.

vercel.json
json
{
"github": {
"silent": true
}
}

See the documentation for this config option here.

Example

Here are a few examples from some of my projects, with and without other options in the vercel.json:

Easy Usage

Note: This only works correctly if you don't already have a vercel.json in your folder.

Copy the following snippet and run in your shell from the root of the git repo / app. It will:

  1. Create a vercel.json file with the above JSON.
  2. Commit and push it to your git repo.
bash
cat > vercel.json <<EOF
{
"github": {
"silent": true
}
}
EOF
git add vercel.json
git commit -m "stop vercel's github bot comment on commits"
git push
Created 08/27/22 • Updated 09/25/22
Found a mistake, or want to suggest an improvement? Edit on GitHub here
and see edit history here

License & Attribution

Attribution

You should place the following attribution (and probably the license below it) above your copy of the code, but 🤷‍♂️.

This snippet "Stop Vercel GitHub Comments" from "https://soorria.com/snippets/stop-vercel-github-comments" 
was created by Soorria Saruva (https://soorria.com) and is covered under the 
MIT license found here: https://github.com/soorria/soorria.com/blob/master/LICENSE.

License

If you want, you can (and probably should) include the entire license below. I'm not a lawyer, though so idrk.

MIT License Copyright (c) 2022 Soorria Saruva

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.