Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

g1t.sh
713 linesCodeBlameRaw
1---
2title: Dependency updates
3description: Keep a repository's dependencies current with a dependabot.yml file. g1t opens pull requests that raise them on the schedule you set, and lands them through your required checks.
4---
5
6g1t keeps your dependencies current from one file in your repository,
7written in `dependabot.yml` version 2 syntax. On the schedule you set, g1t
8checks each dependency's registry for newer versions and opens pull
9requests that raise them. They land through your branch's required checks
10like any other change.
11
12The same file also shapes the [security updates](/guides/security/#security-updates)
13g1t opens for vulnerable dependencies. See
14[Security updates follow the same file](#security-updates-follow-the-same-file).
15
16## Turn on version updates
17
181. Add `.g1t/dependabot.yml` to your default branch:
19
20 ```yaml
21 version: 2
22 updates:
23 - package-ecosystem: npm
24 directory: /
25 schedule:
26 interval: weekly
27 ```
28
292. Push it. g1t reads the file on every push to the default branch, and
30 checks each entry it can update once, straight away.
313. Open the project's **Security** page and choose **Dependency updates**.
32 It lists each entry, when it runs next, and what its last run found.
33
34A repository you bring to g1t keeps its existing file. You don't need to
35move or change it.
36
37## Where g1t reads the file
38
39g1t reads the file from the default branch, at the first of these paths
40that exists:
41
42| Order | Path |
43| --- | --- |
44| 1 | `.g1t/dependabot.yml` |
45| 2 | `.g1t/dependabot.yaml` |
46| 3 | `.github/dependabot.yml` |
47| 4 | `.github/dependabot.yaml` |
48
49When a file exists under both `.g1t/` and `.github/`, g1t reads the one
50under `.g1t/`, and the Security page says the other is ignored.
51
52g1t reads the file on every push to the default branch, and at least once
53a day, with the daily [dependency scan](/guides/security/#dependencies).
54
55## Checking the file
56
57g1t checks the whole file each time it reads it. Every problem is reported
58with its line and the key it is on:
59
60```text
61line 6, updates[0].schedule.interval: `hourly` is not an interval. Use `daily`, `weekly`, `monthly`, `quarterly`, `semiannually`, `yearly` or `cron`.
62```
63
64- A key g1t does not know is a problem, so a misspelled option is never
65 passed over in silence.
66- A file with any problem is not acted on: g1t opens nothing from it until
67 it is fixed. The Security page lists each problem.
68- `version` must be `2` (or `"2"`).
69- The file holds at most 200 entries and 100 registries. Each ecosystem,
70 directory and target branch is listed once; a second entry for the same
71 ones is a problem.
72- YAML anchors, aliases and `<<` merge keys work.
73
74### Checking a pull request that changes the file
75
76A pull request that changes the file gets a status named
77`g1t / dependabot.yml` on its head commit:
78
79| Status | Description |
80| --- | --- |
81| Success | `.g1t/dependabot.yml is valid: 3 entries.` |
82| Failure | The first problem, and how many more there are, such as `line 6, updates[0].schedule.interval: … (and 2 more)` |
83
84Make it a [required status check](/guides/pull-requests/#required-status-checks)
85to stop a broken file from reaching the default branch.
86
87## Ecosystems
88
89g1t accepts every `package-ecosystem` value the format names, and opens
90version update pull requests for four of them:
91
92| `package-ecosystem` | Lockfiles | Manifests |
93| --- | --- | --- |
94| `npm` | `package-lock.json`, `pnpm-lock.yaml`, `yarn.lock` | `package.json` |
95| `cargo` | `Cargo.lock` | `Cargo.toml` |
96| `gomod` | `go.mod`, `go.sum` | `go.mod` |
97| `pip` | Pins in `requirements.txt`, `poetry.lock` | `requirements.txt`, `pyproject.toml` |
98
99A directory is updated only when it has a lockfile: its own, or the
100nearest one above it, as in a workspace.
101
102These values are read and checked, and the Security page lists their
103entries as not updated yet: `bazel`, `bun`, `bundler`, `composer`, `conda`,
104`deno`, `devcontainers`, `docker`, `docker-compose`, `dotnet-sdk`, `elm`,
105`github-actions`, `gitsubmodule`, `gradle`, `helm`, `julia`, `maven`, `mix`,
106`nix`, `nuget`, `opentofu`, `pre-commit`, `pub`, `rust-toolchain`, `sbt`,
107`swift`, `terraform`, `uv` and `vcpkg`.
108
109With `enable-beta-ecosystems: true` at the top of the file, any other
110`package-ecosystem` name is accepted too.
111
112## When updates run
113
114Each entry g1t updates runs once as soon as g1t first reads the file with
115it, and then on its `schedule`. g1t picks up due entries every five
116minutes.
117
118| `interval` | Runs |
119| --- | --- |
120| `daily` | Monday to Friday. |
121| `weekly` | Once a week, on `day` (`monday` unless you set it). |
122| `monthly` | On the 1st of each month. |
123| `quarterly` | On 1 January, 1 April, 1 July and 1 October. |
124| `semiannually` | On 1 January and 1 July. |
125| `yearly` | On 1 January. |
126| `cron` | When `cronjob` says. |
127
128The other `schedule` keys:
129
130| Key | Value | Default |
131| --- | --- | --- |
132| `day` | A day of the week, such as `friday`. Used by `weekly`. | `monday` |
133| `time` | The time of day, as `hh:mm`, such as `"09:00"`. | A time g1t picks |
134| `timezone` | An IANA time zone, such as `America/New_York`. Daylight saving is followed. | `UTC` |
135| `cronjob` | A five-field cron expression, such as `"0 9 * * 1"`, or a phrase such as `every weekday at 9:30am`. Required with, and only read for, `interval: cron`. | |
136
137`cronjob` also takes these phrases: `every day at 5pm`,
138`every weekday at 9:30am`, `every monday at 09:00`, `every hour` and
139`every 6 hours`.
140
141Without `time`, g1t picks a time of day for each entry of each repository
142and keeps it, so your repositories don't all update at once. The Security
143page shows it as "a time picked for this repository".
144
145To run an entry now, choose **Check for updates** next to it on the
146Security page. You need the Write [role](/guides/access-and-roles/).
147
148## What a run does
149
1501. g1t reads the manifests and lockfiles in the entry's directories.
1512. It asks each dependency's registry which versions exist: the npm
152 registry, crates.io, the Go module proxy or PyPI, or a
153 [private registry](#private-registries) you name.
1543. It picks each dependency's target version, following `allow`, `ignore`,
155 `cooldown` and `versioning-strategy`.
1564. It gathers the updates into pull requests, by `groups`, and opens up to
157 `open-pull-requests-limit` of them.
158
159What g1t updates and skips:
160
161- Only dependencies your manifests name (direct dependencies) are updated,
162 unless an [`allow`](#allow) rule says otherwise.
163- Pre-releases are skipped, unless the current version is one.
164- Yanked and deprecated versions are skipped.
165- A run looks at up to 200 dependencies. When there are more, its summary
166 says how many were skipped.
167
168The Security page shows when each entry was last checked and what the run
169found:
170
171```text
172Checked 42 dependencies: 38 up to date, 1 ignored, 3 pull requests asked for, 1 waiting for open-pull-requests-limit.
173```
174
175Version updates run in the same sandbox as security updates, and are
176metered the same way. g1t never runs a manifest's code while updating
177it.
178
179## The pull requests
180
181Version update pull requests are opened by g1t, and show
182[@g1t](/guides/security/#the-g1t-identity) as their author.
183
184| What it updates | Title |
185| --- | --- |
186| One dependency | `Bump lodash from 4.17.20 to 4.17.21` |
187| One dependency, not in the root directory | `Bump lodash from 4.17.20 to 4.17.21 in /web` |
188| A group | `Bump the lint group with 3 updates` |
189| A group in one directory | `Bump the lint group in /web with 2 updates` |
190| A group across directories | `Bump the lint group across 2 directories with 4 updates` |
191| A `group-by: dependency-name` group | `Bump eslint to 9.0.0 across 2 directories` |
192
193The body says what changes and links, when they are known, the
194dependency's changelog (when its registry names one), its release notes
195(for source on github.com, gitlab.com or g1t.sh), its source and its
196package page. A group's body has a table of each package, its old and new
197version, and its directory. Every body lists the
198[commands](#comment-commands) the pull request takes, and its footer names
199the file it came from and the entry's `name`, if it has one.
200
201The commit message is the title, a line for each update, and an
202`updated-dependencies` record:
203
204```text
205Bump lodash from 4.17.20 to 4.17.21
206
207Bumps lodash from 4.17.20 to 4.17.21.
208
209---
210updated-dependencies:
211- dependency-name: lodash
212 dependency-version: 4.17.21
213 dependency-type: direct:production
214 update-type: version-update:semver-patch
215...
216```
217
218`dependency-type` is `direct:production`, `direct:development` or
219`indirect`. A grouped update adds `dependency-group: <name>` to each
220dependency.
221
222### Superseded pull requests
223
224When a newer version comes out for a dependency (or group) that already
225has an open pull request, g1t opens a new pull request and closes the
226older one with the comment "Closed: superseded by #N.". It deletes the
227older pull request's branch.
228
229### Updates you make yourself
230
231You do not have to merge g1t's pull request to update a dependency. On
232every push to the default branch, g1t reads the lockfiles again. When
233every dependency an open version update raises is already at its new
234version or later, or is no longer a dependency, g1t closes the pull
235request with a comment that says so, for example:
236
237> Closed: `lodash` is already at 4.17.21 on `main`, so this update to
238> 4.17.21 is no longer needed.
239
240g1t then deletes the pull request's branch. While one dependency in a
241grouped pull request still needs it, the pull request stays open. This
242applies to updates into the default branch; one with a `target-branch`
243is left for you to close.
244
245### Branches
246
247Each update pull request is made on a branch g1t creates (see
248[branch names](#pull-request-branch-name)). When the pull request merges
249or closes, whether g1t or a person closes it, g1t deletes that branch. If
250someone pushed to the branch after its last commit in the pull request,
251g1t leaves it alone. A branch left from an update pull request that is
252already closed is removed on a later push to the default branch.
253
254Deleting the branch means a closed update pull request cannot be reopened
255from the page. To make a version update again, comment `@g1t reopen` on
256it: g1t makes it again as a new pull request.
257
258### Landing them
259
260Version update pull requests land through the branch's
261[required checks](/guides/pull-requests/#required-status-checks) and the
262[merge queue](/guides/merge-queue/) like any other change.
263
264When a required check fails (or, on a branch with no required checks, a
265workflow's status fails), the pull request stays open with its failing
266checks for you to decide on: push the code changes the update needs to its
267branch, or close it. g1t opens no issue for it. Security updates are
268handled [the same way](/guides/security/#when-an-update-cannot-be-made).
269
270If the sandbox has not pushed a branch 45 minutes after an update started,
271the update is marked failed, and the entry's next run tries again.
272
273## Comment commands
274
275Comment on a pull request g1t opened for a version or security update,
276with a command on the comment's first line:
277
278| Command | What it does |
279| --- | --- |
280| `@g1t rebase` | Brings the branch up to date with the default branch. Refused if someone else has pushed to it; use `@g1t recreate`. |
281| `@g1t recreate` | Makes the pull request again from scratch, dropping anything pushed to it. |
282| `@g1t merge` | Merges it once its required checks pass. |
283| `@g1t squash and merge` | The same as `@g1t merge`: g1t merges pull requests one way. |
284| `@g1t cancel merge` | Cancels an earlier `@g1t merge`. |
285| `@g1t close` | Closes it. g1t does not open one for these versions again, but does for a newer version. |
286| `@g1t reopen` | Makes it again, as a new pull request on the same branch. |
287| `@g1t ignore this dependency` | Closes it, and stops updating the dependency. |
288| `@g1t ignore this major version` | Closes it, and skips this major version. Also `minor` and `patch`. |
289| `@g1t ignore <dependency>` | On a grouped pull request, stops updating one dependency. |
290| `@g1t ignore <dependency> major version` | On a grouped pull request, skips that dependency's major version. Also `minor` and `patch`. |
291| `@g1t unignore <dependency>` | Removes the dependency's ignore conditions. |
292| `@g1t unignore <dependency> major version` | Removes one ignore condition. Also `minor` and `patch`. |
293| `@g1t unignore *` | Removes the ignore conditions set by comments. |
294| `@g1t show <dependency> ignore conditions` | Lists what is skipped for a dependency. |
295| `@g1t show ignore conditions` | Lists the ignore conditions set by comments. |
296
297Commands need the Write [role](/guides/access-and-roles/). `@g1t merge`,
298`@g1t squash and merge` and `@g1t cancel merge` need the role that may
299merge pull requests.
300
301Ignoring a version records an ignore condition. On a pull request that
302raises a dependency to 5.0.0, `@g1t ignore this major version` records
303`>= 5.a, < 6`. Ignore conditions set by comments apply to version and
304security updates, and the Security page lists them.
305
306These commands are not mentions: they never start an agent.
307
308## Security updates follow the same file
309
310[Security updates](/guides/security/#security-updates) are still turned on
311and off with the **Security updates** switch, on the Security overview,
312on **Vulnerabilities** and in the repository's Security settings. When the file has an entry
313for a vulnerable package's ecosystem, in a directory that holds the
314package's lockfile, that entry shapes the security update:
315
316| Option | Effect on security updates |
317| --- | --- |
318| `ignore` | A rule naming the package, or `versions` that cover the fix, skips it. So do ignore conditions set by comments. |
319| `allow` | `dependency-name` rules limit which packages are updated. |
320| `groups` with `applies-to: security-updates` | The group's vulnerable packages are fixed in one pull request, `Bump the <group> group with 2 security updates`, on the branch `g1t/security/<group>-<hash>`. |
321| `commit-message` | Its prefix starts the title. |
322| `assignees`, `reviewers` | Applied when the pull request opens. |
323| `labels`, `milestone` | Applied when the pull request opens, as for version updates. Without `labels`, it carries `dependencies` and the ecosystem's label. |
324| `open-pull-requests-limit`, `cooldown` | Do not apply. Security updates are never held back. |
325
326Security updates always merge into the default branch, so an entry whose
327`target-branch` is another branch does not apply to them.
328
329## The Security page
330
331Open the project's **Security** page and choose the **Dependency updates**
332tab, at `g1t.sh/<owner>/<project>/security/dependency-updates`. It shows:
333
334- the file g1t read, and any file it ignored;
335- each problem in the file, with its line;
336- each entry: its ecosystem and directories, its schedule in words, its
337 next run, when it was last checked and what that run found, whether g1t
338 updates it, and the options it reads but does not act on;
339- the [registries](#private-registries), with the secrets each one names;
340- the open version update pull requests;
341- the ignore conditions set by comments;
342- **Check for updates** next to each entry, to run it now.
343
344## Examples
345
346### A monorepo
347
348Every package under `packages/` and the app in `/web`, checked each
349weekday morning in New York, with lint tools in one pull request and
350everything else in one pull request per dependency:
351
352```yaml
353version: 2
354updates:
355 - package-ecosystem: npm
356 directories:
357 - /web
358 - /packages/*
359 exclude-paths:
360 - "fixtures/**"
361 schedule:
362 interval: daily
363 time: "08:00"
364 timezone: America/New_York
365 open-pull-requests-limit: 10
366 groups:
367 lint:
368 patterns:
369 - "eslint*"
370 - "@typescript-eslint/*"
371 - prettier
372 types:
373 dependency-type: development
374 patterns:
375 - "@types/*"
376 - package-ecosystem: cargo
377 directory: /
378 schedule:
379 interval: weekly
380 day: tuesday
381```
382
383A group across several directories opens one pull request, such as
384`Bump the lint group across 3 directories with 6 updates`.
385
386### Waiting, and leaving some versions alone
387
388Wait a week before taking a new major version and two days for anything
389else, never take React 19, and never update `left-pad`:
390
391```yaml
392version: 2
393updates:
394 - package-ecosystem: npm
395 directory: /
396 schedule:
397 interval: weekly
398 cooldown:
399 default-days: 2
400 semver-major-days: 7
401 exclude:
402 - "@acme/*"
403 ignore:
404 - dependency-name: react
405 versions: [">=19"]
406 - dependency-name: react-dom
407 versions: [">=19"]
408 - dependency-name: left-pad
409```
410
411Your own `@acme/*` packages are taken as soon as they are published.
412
413### A private npm registry
414
415Store the token as a secret named `NPM_TOKEN` in **Settings → Secrets**
416(see [Secrets and variables](/guides/secrets-and-variables/)), then name
417it in the file:
418
419```yaml
420version: 2
421registries:
422 acme-npm:
423 type: npm-registry
424 url: https://npm.acme.dev
425 token: ${{secrets.NPM_TOKEN}}
426 scope: "@acme"
427updates:
428 - package-ecosystem: npm
429 directory: /
430 registries:
431 - acme-npm
432 schedule:
433 interval: daily
434```
435
436Packages under `@acme` come from `npm.acme.dev`, and every other package
437from the public npm registry.
438
439### Commit messages and branch names
440
441```yaml
442version: 2
443updates:
444 - package-ecosystem: npm
445 directory: /web
446 schedule:
447 interval: weekly
448 commit-message:
449 prefix: build
450 prefix-development: chore
451 include: scope
452 pull-request-branch-name:
453 prefix: deps
454 separator: "-"
455```
456
457An update to `lodash`, a production dependency, opens:
458
459```text
460build(deps): bump lodash from 4.17.20 to 4.17.21 in /web
461```
462
463on the branch `deps-npm_and_yarn-web-lodash-4.17.21`. An update that
464only touches development dependencies is titled
465`chore(deps-dev): bump …`.
466
467### Security updates in one pull request
468
469Fix every vulnerable npm package in one pull request, and keep version
470updates one per dependency:
471
472```yaml
473version: 2
474updates:
475 - package-ecosystem: npm
476 directory: /
477 schedule:
478 interval: weekly
479 groups:
480 security:
481 applies-to: security-updates
482 patterns:
483 - "*"
484 reviewers:
485 - alice
486```
487
488To use the file only for security updates, set
489`open-pull-requests-limit: 0` on the entry.
490
491## Options
492
493Each entry under `updates` takes the options below. `package-ecosystem`,
494`directory` (or `directories`) and `schedule` are required. Unless a row
495says otherwise, g1t acts on every option.
496
497| Option | What g1t does | Default |
498| --- | --- | --- |
499| `package-ecosystem` | The [ecosystem](#ecosystems). | Required |
500| `directory` | Where the manifest is, from the repository's root, such as `/` or `/web`. No wildcards. | Required, or `directories` |
501| `directories` | A list of directories, with globs: `*`, `**` and `?`. | |
502| `exclude-paths` | Globs, relative to each directory, of manifests to leave out. | |
503| `schedule` | [When updates run](#when-updates-run). | Required |
504| `allow` | [Which dependencies are updated](#allow). | Direct dependencies |
505| `ignore` | [Dependencies and versions to skip](#ignore). | |
506| `cooldown` | [How long a release waits](#cooldown). | 3 days |
507| `groups` | [Updates gathered into one pull request](#groups). | One pull request per dependency and directory |
508| `versioning-strategy` | [How a requirement is raised](#versioning-strategy). | `increase` |
509| `open-pull-requests-limit` | How many of this entry's version update pull requests can be open at once. A group counts as one, and a newer version replacing an open pull request does not add one. `0` turns version updates off for the entry. Security updates are not limited by it. | `5` |
510| `commit-message` | [The title and commit message's prefix](#commit-message). | |
511| `pull-request-branch-name` | [The branch name](#pull-request-branch-name). | |
512| `rebase-strategy` | `auto`: an open pull request whose branch conflicts with the default branch is made again from the default branch, unless someone else pushed to it. `disabled`: never. | `auto` |
513| `assignees` | Usernames assigned when the pull request opens. Also applies to security updates. | |
514| `reviewers` | Usernames whose review is asked for when the pull request opens. A team (`org/team`) is skipped. Also applies to security updates. | |
515| `registries` | The [registries](#private-registries) the entry uses: a list of names, or `"*"` for all of them. | |
516| `target-branch` | The branch updates start from and merge into. Its manifests are read, each update is made from it, and its pull request's [base](/guides/base-branches/) is that branch. The default branch's protection does not cover it. | The default branch |
517| `labels` | The [labels](/guides/labels/) put on each pull request. A label the repository lacks is created. `labels: []` puts none on. | `dependencies` and the ecosystem's label |
518| `milestone` | The number of a [milestone](/guides/milestones/) to put each pull request in. A number the repository has no milestone for is skipped. | |
519| `vendor` | Read. Vendored copies of dependencies are not updated. | `false` |
520| `insecure-external-code-execution` | Read. g1t never runs a manifest's code while updating it. | |
521| `name` | A name for the entry, 3 to 100 characters, shown in the footer of its pull requests. | |
522| `multi-ecosystem-group` | The [multi-ecosystem group](#multi-ecosystem-groups) the entry belongs to. | |
523| `patterns` | Only read for an entry in a multi-ecosystem group, where it is required. | |
524
525At the top of the file, beside `version` and `updates`:
526
527| Option | What g1t does |
528| --- | --- |
529| `registries` | The [private registries](#private-registries) entries can use. |
530| `enable-beta-ecosystems` | `true` accepts any `package-ecosystem` name. |
531| `multi-ecosystem-groups` | [Groups across ecosystems](#multi-ecosystem-groups). |
532
533### `allow`
534
535A list of rules. With rules, a dependency is updated only when it matches
536one. Without, direct dependencies are.
537
538| Key | Value |
539| --- | --- |
540| `dependency-name` | A name. `*` matches any run of characters, and case is ignored. |
541| `dependency-type` | `direct`, `indirect`, `all`, `production` or `development`. For `cargo`, `gomod` and `pip`, `indirect` and `all` add the lockfile's other packages. |
542| `update-types` | How far a matching dependency may move: a list of `version-update:semver-major`, `version-update:semver-minor` and `version-update:semver-patch`. |
543
544A rule needs `dependency-name` or `dependency-type`.
545
546### `ignore`
547
548A list of rules. A dependency that matches both an `allow` rule and an
549`ignore` rule is ignored.
550
551| Key | Value |
552| --- | --- |
553| `dependency-name` | A name. `*` matches any run of characters. Without it, the rule applies to every dependency. |
554| `versions` | A requirement, or a list of them, in the ecosystem's own syntax. Versions they match are skipped. |
555| `update-types` | Kinds of update to skip: `version-update:semver-major`, `version-update:semver-minor`, `version-update:semver-patch`. |
556
557A rule with only `dependency-name` skips the dependency entirely. A rule
558needs at least one key. `versions` takes each ecosystem's own syntax:
559
560| Syntax | Examples |
561| --- | --- |
562| npm | `^1.0.0`, `1.x`, `>=19` |
563| pip | `~=1.4`, `==1.*`, `!=1.5.0` |
564| Bundler | `~> 2.0` |
565| NuGet | `7.*` |
566| Maven | `[1.4,)` |
567
568### `cooldown`
569
570A release newer than its cooldown is passed over for the newest version
571that is past it. Without `cooldown`, every version waits 3 days.
572
573| Key | Value |
574| --- | --- |
575| `default-days` | Days to wait for any update, 1 to 90. |
576| `semver-major-days` | Days to wait for a major update, 1 to 90. |
577| `semver-minor-days` | Days to wait for a minor update, 1 to 90. |
578| `semver-patch-days` | Days to wait for a patch update, 0 to 90. |
579| `include` | Dependency names (with `*`) the cooldown applies to, up to 150. |
580| `exclude` | Dependency names (with `*`) it does not apply to, up to 150. `exclude` wins over `include`. |
581
582A registry that does not say when a version was published, such as a
583private Cargo index without `pubtime` or most private Go proxies, has no
584cooldown applied. Cooldown never applies to security updates.
585
586### `groups`
587
588A mapping of group names to rules. A name starts and ends with a letter or
589digit, and holds only letters, digits, `|`, `_` and `-`.
590
591| Key | Value | Default |
592| --- | --- | --- |
593| `applies-to` | `version-updates` or `security-updates`. | `version-updates` |
594| `patterns` | Dependency names (with `*`) in the group. | Every dependency |
595| `exclude-patterns` | Dependency names (with `*`) left out. | |
596| `dependency-type` | `production` or `development`. | Both |
597| `update-types` | A list of `major`, `minor` and `patch`. | All |
598| `group-by` | `dependency-name`: one pull request per dependency, across all the entry's directories. Version updates only. | |
599
600A dependency joins the first group that takes it. Dependencies no group
601takes open one pull request per dependency and directory. A group across
602several directories opens one pull request.
603
604### `versioning-strategy`
605
606| Value | What g1t does |
607| --- | --- |
608| `increase` | Raises the manifest's requirement, keeping its style: `^`, `~` or exact. |
609| `auto` | The same as `increase`. |
610| `increase-if-necessary` | Updates the lockfile within the requirement when it allows the new version, and raises the requirement when it does not. |
611| `widen` | For npm, adds the new range: `^1.2.0 \|\| ^2.0.0`. |
612| `lockfile-only` | Updates only lockfiles, and only to versions the requirement already allows. |
613
614For `gomod`, every strategy runs `go get` and then `go mod tidy`. Pins in
615`requirements.txt` are rewritten.
616
617### `commit-message`
618
619| Key | Value |
620| --- | --- |
621| `prefix` | Starts the title and commit message. At most 50 characters. |
622| `prefix-development` | Used instead of `prefix` for an update that only touches development dependencies. At most 50 characters. |
623| `include` | `scope` adds `(deps)`, or `(deps-dev)` for development dependencies, after the prefix. |
624
625How the prefix joins the title:
626
627- A prefix that ends with a letter, a digit, `)` or `]` is followed by a
628 colon and a space: `build: bump …`.
629- A prefix that ends with a space is used as it is: `deps bump …`.
630- Any other prefix is followed by a space.
631- With `include: scope` and no prefix, the prefix is `chore`:
632 `chore(deps): bump …`.
633
634With a prefix, `Bump` becomes `bump`:
635`build(deps): bump lodash from 4.17.20 to 4.17.21`.
636
637### `pull-request-branch-name`
638
639| Key | Value | Default |
640| --- | --- | --- |
641| `prefix` | What every branch name starts with. At most 50 characters. | `g1t` |
642| `separator` | `/`, `-` or `_`, between the parts of the name. | `/` |
643| `max-length` | 20 to 244. A longer name is cut, and ends with a hash. | `100` |
644| `word-separator` | Replaces `_` after the prefix: `-`, `_`, `/` or `.`. | |
645| `branch-name-case` | `lowercase` or `uppercase`, after the prefix. | |
646| `template` | The whole name, at most 200 characters, from the placeholders below. | |
647
648Template placeholders: `{prefix}`, `{package_manager}`, `{directory}`,
649`{target_branch}`, `{dependency}`, `{version}`, `{group_name}` and
650`{name}`.
651
652Default branch names:
653
654| Update | Branch |
655| --- | --- |
656| `lodash` in `/` | `g1t/npm_and_yarn/lodash-4.17.21` |
657| `lodash` in `/web` | `g1t/npm_and_yarn/web/lodash-4.17.21` |
658| The `lint` group | `g1t/npm_and_yarn/lint-<10-character hash>` |
659
660The package manager part is `npm_and_yarn` for npm, `cargo` for Cargo,
661`go_modules` for Go and `pip` for pip.
662
663### Private registries
664
665Name registries at the top of the file, under `registries`, and list the
666ones each entry uses in its own `registries`.
667
668| Key | Value |
669| --- | --- |
670| `type` | The registry's type. Required. |
671| `url` | The registry's address, over `https`. |
672| `username`, `password` | Credentials for basic sign-in. |
673| `token` | A token. |
674| `key` | A key. |
675| `replaces-base` | `true` to use this registry for every package, not only those it is scoped to. |
676| `scope` | For `npm-registry`: an npm scope such as `@acme`, or a list of them. |
677
678The format's other keys (`organization`, `repo`, `auth-key`,
679`public-key-fingerprint`, `registry`, `tenant-id`, `client-id`,
680`jfrog-oidc-provider-name`, `identity-mapping-name`, `audience`,
681`aws-region`, `account-id`, `role-name`, `domain` and `domain-owner`) are
682read and checked.
683
684`type` is one of `cargo-registry`, `composer-repository`,
685`docker-registry`, `git`, `goproxy-server`, `helm-registry`,
686`hex-organization`, `hex-repository`, `maven-repository`, `npm-registry`,
687`nuget-feed`, `pub-repository`, `python-index`, `rubygems-server` and
688`terraform-registry`. g1t uses four of them, for version lookups and in
689the update sandbox:
690
691| Type | Used for |
692| --- | --- |
693| `npm-registry` | With a `scope`, that scope's packages. With `replaces-base: true`, every package. |
694| `cargo-registry` | Every crate, with `replaces-base: true`. |
695| `goproxy-server` | Every module, with `replaces-base: true`. |
696| `python-index` | Every package, with `replaces-base: true`. |
697
698A registry that signs in with OIDC is not used.
699
700Put credentials in [secrets](/guides/secrets-and-variables/) and name
701them as `${{secrets.NAME}}`. g1t fills them from the repository's and the
702workspace's secrets that are available to workflows. When a secret is
703missing, that registry is not used, and the run says which secret it
704needed. g1t never stores or shows the credentials; the Security page lists
705each registry with the secrets it names.
706
707### Multi-ecosystem groups
708
709`multi-ecosystem-groups` at the top of the file names groups, each with a
710`schedule`. An entry joins one with `multi-ecosystem-group: <name>`, and
711then needs `patterns` (`["*"]` for every dependency). The entry runs on the
712group's schedule. Its updates still open one pull request per ecosystem,
713not one for the whole group.