You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit cc0aec8
Browse filesBrowse the repository at this point in the historyBrowse files
| `version` | `2.*` | The commit-check release to install: `2.*`for the latest 2.x, or an exact one such as `2.24.1`. |
85
+
| `image` | `python:3.13` | The image the job runs in. It needs Python 3.11 or newer with pip, and git, which `-slim` and `-alpine` images do not have. |
86
+
| `stage` | `test` | The stage the job runs in. |
87
+
| `job-name` | `commit-check` | The name of the job. |
88
+
89
+
### Writing the job yourself
79
90
91
+
A self-managed GitLab cannot include a component from gitlab.com. There, or
92
+
to call the command your own way, write the job out:
- `--pr-title`checks the title with the message rules a one-line title can
125
-
meet: everything `--message` runs except a body (CC011), a sign-off (CC012)
160
+
In a job written by hand they are `--pr-title` and `--pr-body-ai-attribution`.
161
+
162
+
- `pr-title`checks the title with the message rules a one-line title can
163
+
meet: everything `message` runs except a body (CC011), a sign-off (CC012)
126
164
and an AI author (CC017). With squash merges the title is often the commit
127
165
message that lands. A draft marker (`Draft:`, `[Draft]`, `(Draft)`) is not
128
166
part of the title that is checked.
129
-
- `--pr-body-ai-attribution`checks the description against your
167
+
- `pr-body-ai-attribution`checks the description against your
130
168
`ai_attribution`policy, and, when `[pull_request] ai_declaration_checkboxes`
131
169
is set, that it ticks exactly one AI declaration box (CC501). GitLab task
132
170
lists (`- [x]`, `* [x]`, `1. [x]`) are read like GitHub's.
133
171
- GitLab passes a job only the first 2700 characters of a description, so
134
172
only that part is checked, and the job says so when it happens. Put the AI
135
173
declaration boxes near the top of the merge request template, so a long
136
174
description does not cut them off. To fail a description that was cut
137
-
rather than check part of it, add before the `commit-check-ci` line:
175
+
rather than check part of it, give the job a `before_script`. A job of the
176
+
same name in your `.gitlab-ci.yml` is merged with the component's:
138
177
139
178
```yaml
179
+
commit-check:
180
+
before_script:
140
181
- test "$CI_MERGE_REQUEST_DESCRIPTION_IS_TRUNCATED" != "true" || { echo "The description is over 2700 characters; GitLab passed only part of it"; exit 1; }
141
182
```
142
183
@@ -167,7 +208,8 @@ pipelines:
167
208
step runs. The checks stop at `BITBUCKET_COMMIT`, the pull request's own
168
209
last commit, so commits that only came in with that merge are not checked.
169
210
The rebase check judges that commit too, not the merge.
170
-
- The output and the [options](#options) are the same as on GitLab.
211
+
- The output is the same as on GitLab, and so are the options of a
0 commit comments