Preventing deepsource from running on a commit

Is there a way to prevent deepsource from running on a commit?

Our pipeline has a step at the end that creates a tag and commit for the release, and the push is preformed with a -o ci.skip parameter. Gitlab honors this, and skips the pipeline, but Deepsource still triggers.

2 Likes

I would attach a screenshot, but it wont let me :slight_smile:

Hey @azzlack! We don’t have an option for users to tell us to skip a commit for analysis. If DeepSource is active on a repository, it will analyze all commits in a PR and on the default branch. The use case you’ve mentioned is valuable, though, and I think it will be a good idea for us to support it. Thank you for your feedback!

Just so that I understand this correctly, you’re only talking about the commits off the default branch to create a tag/release on GitHub, yes? We can give the option to exclude such commits (that are not on the default branch — since we use those to manage the baseline of issues and metrics for a repository) from the repository settings.

Do you think this makes sense?

Sorry for the late reply, i did not notice you replied to this post before today :slight_smile:
I am talking about commits like this:
CleanShot 2023-02-15 at 09.58.08

Although I think this should be supported for any branch, it should ideally respect the ci.skip flag from the push, or support [ci skip] in the commit message.

@sanket sorry for the ping, but have you looked into this any further? :slight_smile:

Hey, @azzlack.

Glad to tell you that we now support skipping analysis/transform on a commit by adding a string such as [ci skip]. Please refer to these docs to learn more.

Just a clarification:

If the PR has multiple commits, at least the top commit of each push needs to have [ci skip] (or the other options).