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.

711 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 work item 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, by the repository's default [merge method](/guides/pull-requests/#merge-methods). |
283| `@g1t squash and merge` | Squashes it into one commit and merges it, once its required checks have passed. Refused where the repository or its rules do not allow squash merging. |
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
306## Security updates follow the same file
307
308[Security updates](/guides/security/#security-updates) are still turned on
309and off with the **Security updates** switch, on the Security overview,
310on **Vulnerabilities** and in the repository's Security settings. When the file has an entry
311for a vulnerable package's ecosystem, in a directory that holds the
312package's lockfile, that entry shapes the security update:
313
314| Option | Effect on security updates |
315| --- | --- |
316| `ignore` | A rule naming the package, or `versions` that cover the fix, skips it. So do ignore conditions set by comments. |
317| `allow` | `dependency-name` rules limit which packages are updated. |
318| `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>`. |
319| `commit-message` | Its prefix starts the title. |
320| `assignees`, `reviewers` | Applied when the pull request opens. |
321| `labels`, `milestone` | Applied when the pull request opens, as for version updates. Without `labels`, it carries `dependencies` and the ecosystem's label. |
322| `open-pull-requests-limit`, `cooldown` | Do not apply. Security updates are never held back. |
323
324Security updates always merge into the default branch, so an entry whose
325`target-branch` is another branch does not apply to them.
326
327## The Security page
328
329Open the project's **Security** page and choose the **Dependency updates**
330tab, at `g1t.sh/<owner>/<project>/security/dependency-updates`. It shows:
331
332- the file g1t read, and any file it ignored;
333- each problem in the file, with its line;
334- each entry: its ecosystem and directories, its schedule in words, its
335 next run, when it was last checked and what that run found, whether g1t
336 updates it, and the options it reads but does not act on;
337- the [registries](#private-registries), with the secrets each one names;
338- the open version update pull requests;
339- the ignore conditions set by comments;
340- **Check for updates** next to each entry, to run it now.
341
342## Examples
343
344### A monorepo
345
346Every package under `packages/` and the app in `/web`, checked each
347weekday morning in New York, with lint tools in one pull request and
348everything else in one pull request per dependency:
349
350```yaml
351version: 2
352updates:
353 - package-ecosystem: npm
354 directories:
355 - /web
356 - /packages/*
357 exclude-paths:
358 - "fixtures/**"
359 schedule:
360 interval: daily
361 time: "08:00"
362 timezone: America/New_York
363 open-pull-requests-limit: 10
364 groups:
365 lint:
366 patterns:
367 - "eslint*"
368 - "@typescript-eslint/*"
369 - prettier
370 types:
371 dependency-type: development
372 patterns:
373 - "@types/*"
374 - package-ecosystem: cargo
375 directory: /
376 schedule:
377 interval: weekly
378 day: tuesday
379```
380
381A group across several directories opens one pull request, such as
382`Bump the lint group across 3 directories with 6 updates`.
383
384### Waiting, and leaving some versions alone
385
386Wait a week before taking a new major version and two days for anything
387else, never take React 19, and never update `left-pad`:
388
389```yaml
390version: 2
391updates:
392 - package-ecosystem: npm
393 directory: /
394 schedule:
395 interval: weekly
396 cooldown:
397 default-days: 2
398 semver-major-days: 7
399 exclude:
400 - "@acme/*"
401 ignore:
402 - dependency-name: react
403 versions: [">=19"]
404 - dependency-name: react-dom
405 versions: [">=19"]
406 - dependency-name: left-pad
407```
408
409Your own `@acme/*` packages are taken as soon as they are published.
410
411### A private npm registry
412
413Store the token as a secret named `NPM_TOKEN` in **Settings → Secrets**
414(see [Secrets and variables](/guides/secrets-and-variables/)), then name
415it in the file:
416
417```yaml
418version: 2
419registries:
420 acme-npm:
421 type: npm-registry
422 url: https://npm.acme.dev
423 token: ${{secrets.NPM_TOKEN}}
424 scope: "@acme"
425updates:
426 - package-ecosystem: npm
427 directory: /
428 registries:
429 - acme-npm
430 schedule:
431 interval: daily
432```
433
434Packages under `@acme` come from `npm.acme.dev`, and every other package
435from the public npm registry.
436
437### Commit messages and branch names
438
439```yaml
440version: 2
441updates:
442 - package-ecosystem: npm
443 directory: /web
444 schedule:
445 interval: weekly
446 commit-message:
447 prefix: build
448 prefix-development: chore
449 include: scope
450 pull-request-branch-name:
451 prefix: deps
452 separator: "-"
453```
454
455An update to `lodash`, a production dependency, opens:
456
457```text
458build(deps): bump lodash from 4.17.20 to 4.17.21 in /web
459```
460
461on the branch `deps-npm_and_yarn-web-lodash-4.17.21`. An update that
462only touches development dependencies is titled
463`chore(deps-dev): bump …`.
464
465### Security updates in one pull request
466
467Fix every vulnerable npm package in one pull request, and keep version
468updates one per dependency:
469
470```yaml
471version: 2
472updates:
473 - package-ecosystem: npm
474 directory: /
475 schedule:
476 interval: weekly
477 groups:
478 security:
479 applies-to: security-updates
480 patterns:
481 - "*"
482 reviewers:
483 - alice
484```
485
486To use the file only for security updates, set
487`open-pull-requests-limit: 0` on the entry.
488
489## Options
490
491Each entry under `updates` takes the options below. `package-ecosystem`,
492`directory` (or `directories`) and `schedule` are required. Unless a row
493says otherwise, g1t acts on every option.
494
495| Option | What g1t does | Default |
496| --- | --- | --- |
497| `package-ecosystem` | The [ecosystem](#ecosystems). | Required |
498| `directory` | Where the manifest is, from the repository's root, such as `/` or `/web`. No wildcards. | Required, or `directories` |
499| `directories` | A list of directories, with globs: `*`, `**` and `?`. | |
500| `exclude-paths` | Globs, relative to each directory, of manifests to leave out. | |
501| `schedule` | [When updates run](#when-updates-run). | Required |
502| `allow` | [Which dependencies are updated](#allow). | Direct dependencies |
503| `ignore` | [Dependencies and versions to skip](#ignore). | |
504| `cooldown` | [How long a release waits](#cooldown). | 3 days |
505| `groups` | [Updates gathered into one pull request](#groups). | One pull request per dependency and directory |
506| `versioning-strategy` | [How a requirement is raised](#versioning-strategy). | `increase` |
507| `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` |
508| `commit-message` | [The title and commit message's prefix](#commit-message). | |
509| `pull-request-branch-name` | [The branch name](#pull-request-branch-name). | |
510| `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` |
511| `assignees` | Usernames assigned when the pull request opens. Also applies to security updates. | |
512| `reviewers` | Usernames whose review is asked for when the pull request opens. A team (`org/team`) is skipped. Also applies to security updates. | |
513| `registries` | The [registries](#private-registries) the entry uses: a list of names, or `"*"` for all of them. | |
514| `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 |
515| `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 |
516| `milestone` | The number of a [milestone](/guides/milestones/) to put each pull request in. A number the repository has no milestone for is skipped. | |
517| `vendor` | Read. Vendored copies of dependencies are not updated. | `false` |
518| `insecure-external-code-execution` | Read. g1t never runs a manifest's code while updating it. | |
519| `name` | A name for the entry, 3 to 100 characters, shown in the footer of its pull requests. | |
520| `multi-ecosystem-group` | The [multi-ecosystem group](#multi-ecosystem-groups) the entry belongs to. | |
521| `patterns` | Only read for an entry in a multi-ecosystem group, where it is required. | |
522
523At the top of the file, beside `version` and `updates`:
524
525| Option | What g1t does |
526| --- | --- |
527| `registries` | The [private registries](#private-registries) entries can use. |
528| `enable-beta-ecosystems` | `true` accepts any `package-ecosystem` name. |
529| `multi-ecosystem-groups` | [Groups across ecosystems](#multi-ecosystem-groups). |
530
531### `allow`
532
533A list of rules. With rules, a dependency is updated only when it matches
534one. Without, direct dependencies are.
535
536| Key | Value |
537| --- | --- |
538| `dependency-name` | A name. `*` matches any run of characters, and case is ignored. |
539| `dependency-type` | `direct`, `indirect`, `all`, `production` or `development`. For `cargo`, `gomod` and `pip`, `indirect` and `all` add the lockfile's other packages. |
540| `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`. |
541
542A rule needs `dependency-name` or `dependency-type`.
543
544### `ignore`
545
546A list of rules. A dependency that matches both an `allow` rule and an
547`ignore` rule is ignored.
548
549| Key | Value |
550| --- | --- |
551| `dependency-name` | A name. `*` matches any run of characters. Without it, the rule applies to every dependency. |
552| `versions` | A requirement, or a list of them, in the ecosystem's own syntax. Versions they match are skipped. |
553| `update-types` | Kinds of update to skip: `version-update:semver-major`, `version-update:semver-minor`, `version-update:semver-patch`. |
554
555A rule with only `dependency-name` skips the dependency entirely. A rule
556needs at least one key. `versions` takes each ecosystem's own syntax:
557
558| Syntax | Examples |
559| --- | --- |
560| npm | `^1.0.0`, `1.x`, `>=19` |
561| pip | `~=1.4`, `==1.*`, `!=1.5.0` |
562| Bundler | `~> 2.0` |
563| NuGet | `7.*` |
564| Maven | `[1.4,)` |
565
566### `cooldown`
567
568A release newer than its cooldown is passed over for the newest version
569that is past it. Without `cooldown`, every version waits 3 days.
570
571| Key | Value |
572| --- | --- |
573| `default-days` | Days to wait for any update, 1 to 90. |
574| `semver-major-days` | Days to wait for a major update, 1 to 90. |
575| `semver-minor-days` | Days to wait for a minor update, 1 to 90. |
576| `semver-patch-days` | Days to wait for a patch update, 0 to 90. |
577| `include` | Dependency names (with `*`) the cooldown applies to, up to 150. |
578| `exclude` | Dependency names (with `*`) it does not apply to, up to 150. `exclude` wins over `include`. |
579
580A registry that does not say when a version was published, such as a
581private Cargo index without `pubtime` or most private Go proxies, has no
582cooldown applied. Cooldown never applies to security updates.
583
584### `groups`
585
586A mapping of group names to rules. A name starts and ends with a letter or
587digit, and holds only letters, digits, `|`, `_` and `-`.
588
589| Key | Value | Default |
590| --- | --- | --- |
591| `applies-to` | `version-updates` or `security-updates`. | `version-updates` |
592| `patterns` | Dependency names (with `*`) in the group. | Every dependency |
593| `exclude-patterns` | Dependency names (with `*`) left out. | |
594| `dependency-type` | `production` or `development`. | Both |
595| `update-types` | A list of `major`, `minor` and `patch`. | All |
596| `group-by` | `dependency-name`: one pull request per dependency, across all the entry's directories. Version updates only. | |
597
598A dependency joins the first group that takes it. Dependencies no group
599takes open one pull request per dependency and directory. A group across
600several directories opens one pull request.
601
602### `versioning-strategy`
603
604| Value | What g1t does |
605| --- | --- |
606| `increase` | Raises the manifest's requirement, keeping its style: `^`, `~` or exact. |
607| `auto` | The same as `increase`. |
608| `increase-if-necessary` | Updates the lockfile within the requirement when it allows the new version, and raises the requirement when it does not. |
609| `widen` | For npm, adds the new range: `^1.2.0 \|\| ^2.0.0`. |
610| `lockfile-only` | Updates only lockfiles, and only to versions the requirement already allows. |
611
612For `gomod`, every strategy runs `go get` and then `go mod tidy`. Pins in
613`requirements.txt` are rewritten.
614
615### `commit-message`
616
617| Key | Value |
618| --- | --- |
619| `prefix` | Starts the title and commit message. At most 50 characters. |
620| `prefix-development` | Used instead of `prefix` for an update that only touches development dependencies. At most 50 characters. |
621| `include` | `scope` adds `(deps)`, or `(deps-dev)` for development dependencies, after the prefix. |
622
623How the prefix joins the title:
624
625- A prefix that ends with a letter, a digit, `)` or `]` is followed by a
626 colon and a space: `build: bump …`.
627- A prefix that ends with a space is used as it is: `deps bump …`.
628- Any other prefix is followed by a space.
629- With `include: scope` and no prefix, the prefix is `chore`:
630 `chore(deps): bump …`.
631
632With a prefix, `Bump` becomes `bump`:
633`build(deps): bump lodash from 4.17.20 to 4.17.21`.
634
635### `pull-request-branch-name`
636
637| Key | Value | Default |
638| --- | --- | --- |
639| `prefix` | What every branch name starts with. At most 50 characters. | `g1t` |
640| `separator` | `/`, `-` or `_`, between the parts of the name. | `/` |
641| `max-length` | 20 to 244. A longer name is cut, and ends with a hash. | `100` |
642| `word-separator` | Replaces `_` after the prefix: `-`, `_`, `/` or `.`. | |
643| `branch-name-case` | `lowercase` or `uppercase`, after the prefix. | |
644| `template` | The whole name, at most 200 characters, from the placeholders below. | |
645
646Template placeholders: `{prefix}`, `{package_manager}`, `{directory}`,
647`{target_branch}`, `{dependency}`, `{version}`, `{group_name}` and
648`{name}`.
649
650Default branch names:
651
652| Update | Branch |
653| --- | --- |
654| `lodash` in `/` | `g1t/npm_and_yarn/lodash-4.17.21` |
655| `lodash` in `/web` | `g1t/npm_and_yarn/web/lodash-4.17.21` |
656| The `lint` group | `g1t/npm_and_yarn/lint-<10-character hash>` |
657
658The package manager part is `npm_and_yarn` for npm, `cargo` for Cargo,
659`go_modules` for Go and `pip` for pip.
660
661### Private registries
662
663Name registries at the top of the file, under `registries`, and list the
664ones each entry uses in its own `registries`.
665
666| Key | Value |
667| --- | --- |
668| `type` | The registry's type. Required. |
669| `url` | The registry's address, over `https`. |
670| `username`, `password` | Credentials for basic sign-in. |
671| `token` | A token. |
672| `key` | A key. |
673| `replaces-base` | `true` to use this registry for every package, not only those it is scoped to. |
674| `scope` | For `npm-registry`: an npm scope such as `@acme`, or a list of them. |
675
676The format's other keys (`organization`, `repo`, `auth-key`,
677`public-key-fingerprint`, `registry`, `tenant-id`, `client-id`,
678`jfrog-oidc-provider-name`, `identity-mapping-name`, `audience`,
679`aws-region`, `account-id`, `role-name`, `domain` and `domain-owner`) are
680read and checked.
681
682`type` is one of `cargo-registry`, `composer-repository`,
683`docker-registry`, `git`, `goproxy-server`, `helm-registry`,
684`hex-organization`, `hex-repository`, `maven-repository`, `npm-registry`,
685`nuget-feed`, `pub-repository`, `python-index`, `rubygems-server` and
686`terraform-registry`. g1t uses four of them, for version lookups and in
687the update sandbox:
688
689| Type | Used for |
690| --- | --- |
691| `npm-registry` | With a `scope`, that scope's packages. With `replaces-base: true`, every package. |
692| `cargo-registry` | Every crate, with `replaces-base: true`. |
693| `goproxy-server` | Every module, with `replaces-base: true`. |
694| `python-index` | Every package, with `replaces-base: true`. |
695
696A registry that signs in with OIDC is not used.
697
698Put credentials in [secrets](/guides/secrets-and-variables/) and name
699them as `${{secrets.NAME}}`. g1t fills them from the repository's and the
700workspace's secrets that are available to workflows. When a secret is
701missing, that registry is not used, and the run says which secret it
702needed. g1t never stores or shows the credentials; the Security page lists
703each registry with the secrets it names.
704
705### Multi-ecosystem groups
706
707`multi-ecosystem-groups` at the top of the file names groups, each with a
708`schedule`. An entry joins one with `multi-ecosystem-group: <name>`, and
709then needs `patterns` (`["*"]` for every dependency). The entry runs on the
710group's schedule. Its updates still open one pull request per ecosystem,
711not one for the whole group.