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
Copy file name to clipboardExpand all lines: docs/book/src/plugins/available/autoupdate-v1-alpha.md
+19-6Lines changed: 19 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,10 +11,12 @@ refresh your project scaffold, and wraps it in a GitHub Actions workflow that op
11
11
12
12
- When you don’t deviate too much from the default scaffold — ensure that you see the note about customization [here](https://book.kubebuilder.io/versions_compatibility_supportability#project-customizations).
13
13
- When you want to reduce the burden of keeping the project updated and well-maintained.
14
+
- When you want to guidance and help from AI to know what changes are needed to keep your project up to date
15
+
as to solve conflicts.
14
16
15
17
## How to Use It
16
18
17
-
0 If you want to add the `autoupdate` plugin to your project:
19
+
- If you want to add the `autoupdate` plugin to your project:
This will scaffold and GitHub Actions workflow that runs the [kubebuilder alpha update][alpha-update-command] command.
32
-
Then, whenever a new Kubebuilder release is available, it will open an Issue with a
33
-
Pull Request compare link so you can create the PR and review it, such as:
33
+
This will scaffold a GitHub Actions workflow that runs the [kubebuilder alpha update][alpha-update-command] command.
34
+
Whenever a new Kubebuilder release is available, the workflow will automatically open an **Issue** with a Pull Request compare link so you can easily create the PR and review it, such as:
Moreover, AI models are used to help you understand what changes are needed to keep your project up to date,
39
+
and to suggest resolutions if conflicts are encountered, as in the following example:
40
+
41
+
<imgwidth="715"height="424"alt="AI Example Comment"src="https://github.com/user-attachments/assets/3f8bc35d-8ba0-4fc5-931b-56b1cb238462" />
42
+
43
+
You will also see a list of files changed, making it easier to review the updates.
44
+
And, if conflicts arise, a summary of the conflicts will be provided to help you resolve them.
45
+
46
+
### Workflow details
47
+
37
48
The workflow will check once a week for new releases, and if there are any, it will create an Issue with a Pull Request compare link so you can create the PR and review it.
38
49
The command called by the workflow is:
39
50
@@ -45,12 +56,14 @@ The command called by the workflow is:
45
56
# --force: Completes the merge even if conflicts occur, leaving conflict markers.
46
57
# --push: Automatically pushes the resulting output branch to the 'origin' remote.
47
58
# --restore-path: Preserves specified paths (e.g., CI workflow files) when squashing.
48
-
# --open-gh-issue: Creates a GitHub issue with a link to the generated PR for review.
59
+
# --open-gh-models: Adds an AI-generated comment to the created Issue with
60
+
# a short overview of the scaffold changes and conflict-resolution guidance (If Any).
This integrates cleanly with automation. The [`autoupdate.kubebuilder.io/v1-alpha`][autoupdate-plugin] plugin can scaffold a GitHub Actions workflow that runs the command on a schedule (e.g., weekly). When a new Kubebuilder release is available, it opens an Issue with a compare link so you can create the PR and review it.
187
+
188
+
## Changing Extra Git configs only during the run (does not change your ~/.gitconfig)_
147
189
148
190
By default, `kubebuilder alpha update` applies safe Git configs:
|`--from-version`| Kubebuilder release to update **from** (e.g., `v4.6.0`). If unset, read from the `PROJECT` file when possible. |
176
-
|`--to-version`| Kubebuilder release to update **to** (e.g., `v4.7.0`). If unset, defaults to the latest available release. |
177
-
|`--from-branch`| Git branch that holds your current project code. Defaults to `main`. |
178
-
|`--force`| Continue even if merge conflicts happen. Conflicted files are committed with conflict markers (CI/cron friendly). |
179
-
|`--show-commits`| Keep full history (do not squash). **Not compatible** with `--preserve-path`. |
180
-
|`--restore-path`| Repeatable. Paths to preserve from the base branch (repeatable). Not supported with --show-commits. (e.g., `.github/workflows`). |
181
-
|`--output-branch`| Name of the output branch. Default: `kubebuilder-update-from-<from-version>-to-<to-version>`. |
182
-
|`--push`| Push the output branch to the `origin` remote after the update completes. |
183
-
|`--git-config`| Repeatable. Pass per-invocation Git config as `-c key=value`. **Default** (if omitted): `-c merge.renameLimit=999999 -c diff.renameLimit=999999`. Your configs are applied on top. To disable defaults, include `--git-config disable`|
|`--force`| Continue even if merge conflicts happen. Conflicted files are committed with conflict markers (CI/cron friendly). |
218
+
|`--from-branch`| Git branch that holds your current project code. Defaults to `main`. |
219
+
|`--from-version`| Kubebuilder release to update **from** (e.g., `v4.6.0`). If unset, read from the `PROJECT` file when possible. |
220
+
|`--git-config`| Repeatable. Pass per-invocation Git config as `-c key=value`. **Default** (if omitted): `-c merge.renameLimit=999999 -c diff.renameLimit=999999`. Your configs are applied on top. To disable defaults, include `--git-config disable`. |
221
+
|`--open-gh-issue`| Create a GitHub issue with a pre-filled checklist and compare link after the update completes (requires `gh`). |
222
+
|`--output-branch`| Name of the output branch. Default: `kubebuilder-update-from-<from-version>-to-<to-version>`. |
223
+
|`--push`| Push the output branch to the `origin` remote after the update completes. |
224
+
|`--restore-path`| Repeatable. Paths to preserve from the base branch when squashing (e.g., `.github/workflows`). **Not supported** with `--show-commits`. |
225
+
|`--show-commits`| Keep full history (do not squash). **Not compatible** with `--restore-path`. |
226
+
|`--to-version`| Kubebuilder release to update **to** (e.g., `v4.7.0`). If unset, defaults to the latest available release. |
227
+
|`--use-gh-models`| Post an AI overview as an issue comment using `gh models`. Requires `gh` + `gh-models` extension. Effective only when `--open-gh-issue` is also set. |
228
+
|`-h, --help`| Show help for this command. |
185
229
186
230
<asideclass="note warning">
187
231
<h1>You might need to upgrade your project first</h1>
0 commit comments