Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: skip-ci breaking change #66

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,10 @@ The config reference list all value that can be set in the `cog.toml` file at th

- Type: `String`
- Optional: `true`
- Description: "skip_ci" string that is appended to the end of the bump commit. It can also be
specified using `cog bump --skip-ci <skip_ci_string>`
- Description: A "skip-ci" string to add to the commits when using the ```bump``` or ```commit``` commands. Default value is ```[skip ci]```.
- Example:
```toml
skip_ci = "[skip-ci]"
skip_ci = "[ci-skip]"
```
- Also see:
* [User guide -> Make Cocogitto skip CI CD](../guide/#make-cocogitto-skip-ci-cd)
Expand Down
49 changes: 41 additions & 8 deletions src/guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -977,30 +977,63 @@ tag_prefix = "v"

## Make Cocogitto skip CI CD

Cocogitto will create a commit when performing a bump, which can trigger your CI/CD if you have one. Some CI/CD tools support a "skip_ci" string that you can add to a commit which will skip the pipeline execution. To do so with `cog`, you can use the `skip_ci` configuration in your `cog.toml` file or the `cog bump --skip-ci <string>` option to add a "skip_ci" pattern your CI/CD tool supports.
The ```--skip-ci``` option of the ```bump``` and ```commit``` commands offers the possibility to skip CI/CD by adding a "skip-ci" string your commits. The default string used by Cocogitto is ```[skip ci]``` but you can override it with your own string :
- Using the ```skip_ci``` configuration in the ```cog.toml```.
- Using the ```--skip-ci-override``` option of the ```bump``` and ```commit``` commands.

Note that the ```--skip-ci-override``` option has precedence over the ```skip_ci``` configuration in the ```cog.toml```.

**Example:**
```toml
skip_ci = "[skip ci]"

```bash
❯ cog bump --skip-ci
```

**Result:**

```bash
❯ git log
commit xxx (HEAD -> main, tag: 1.0.0)
Author: John Doe <[email protected]>
Date: Tue Mar 7 15:06:18 2023 +0200
chore(version): 1.0.0 [skip ci]
```

or using the `cog bump` command :
**Example with ```cog.toml``` configuration:**

```toml
skip_ci = "[ci-skip]"
```

```bash
❯ cog bump --skip-ci "[skip ci]"
❯ cog bump --skip-ci
```

**Result:**

```bash
❯ git log
commit 213d08c8c1e12ba7d59497e6eda436a3ce63d87c (HEAD -> main, tag: 1.0.0)
commit xxx (HEAD -> main, tag: 1.0.0)
Author: John Doe <[email protected]>
Date: Tue Mar 7 15:06:18 2023 +0200
chore(version): 1.0.0 [skip ci]
chore(version): 1.0.0 [ci-skip]
```

**Another example using the ```--skip-ci-override``` option:**

```bash
❯ cog bump --skip-ci-override "[ci-skip]"
```

Note that if both `skip_ci` configuration and `--skip-ci` option are used, `cog` will take the `--skip-ci` option.
**Result:**

```bash
❯ git log
commit xxx (HEAD -> main, tag: 1.0.0)
Author: John Doe <[email protected]>
Date: Tue Mar 7 15:06:18 2023 +0200
chore(version): 1.0.0 [ci-skip]
```

## Skip untracked or uncommited changes

Expand Down