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
* Fix incorrect version comparison in example
* Replace deprecated plugins with native filter functions
The commit replaces the deprecated `extractDependabotVersionBump` and
`compareSemver` plugins with their native filter function equivalents
`checkDependabot` and `checkSemver`. Updates documentation and examples
to reflect this change.
Copy file name to clipboardExpand all lines: docs/automations/integrations/dependabot/approve-dependabot/README.md
-5Lines changed: 0 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,11 +10,6 @@ Auto-merge Dependabot PRs
10
10
11
11
=== "By Release Type"
12
12
13
-
!!! warning "Required gitStream Plugins"
14
-
This example requires you to install the [`extractDependabotVersionBump`](/filter-function-plugins/#extractdependabotversionbump) and [`compareSemver`](/filter-function-plugins/#comparesemver) plugins.
Copy file name to clipboardExpand all lines: docs/execution-model.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -200,8 +200,6 @@ This allows developers to get AI feedback during the coding process before marki
200
200
201
201
For example, you can have your normal automations that help developers with their PRs and a separate automation that automates Dependabot or Renovate version bumps. Both automations serve distinctly different purposes: the first helps your developers streamline their PRs, while the other reduces developers' toil by auto-approving version bumps. You will not want to unnecessarily trigger gitStream for Dependabot or Renovate, so you can configure the triggers to exclude the branch where Dependabot or Renovate PRs are created.
202
202
203
-
!!! warning "Required gitStream Plugins"
204
-
This example requires you to install the [`extractDependabotVersionBump`](/filter-function-plugins/#extractdependabotversionbump) and [`compareSemver`](/filter-function-plugins/#comparesemver) plugins.
205
203
206
204
In your default automation file, you should exclude the branch where Dependabot or Renovate PRs are created:
207
205
@@ -270,7 +268,7 @@ automations:
270
268
comment: |
271
269
Dependabot `patch` version bumps are approved and merged automatically.
This plugin is now supported by a native filter function [`checkSemver`](/filter-functions/#checksemver). The native implementation provides better performance and doesn't require plugin installation.
This plugin is now supported by a native filter function [`checkDependabot`](/filter-functions/#checkdependabot). The native implementation provides better performance and doesn't require plugin installation.
Copy file name to clipboardExpand all lines: docs/filter-functions.md
+90-1Lines changed: 90 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,8 @@ The following functions are supported in addition to the built-in functions prov
45
45
|[`allDocs`](#alldocs)<br />Checks the list includes only images |[`files`](./context-variables.md#files)| - | Bool |
46
46
|[`allImages`](#allimages)<br />Checks the list includes only images |[`files`](./context-variables.md#files)| - | Bool |
47
47
|[`allTests`](#alltests)<br />Checks the list includes only tests |[`files`](./context-variables.md#files)| - | Bool |
48
+
|[`checkDependabot`](#checkdependabot)<br />Extract version bump information from Dependabot PRs description | String - PR description | - |[String]|
49
+
|[`checkSemver`](#checksemver)<br />Compare two software version numbers and determine the type of version change |[String] - Array with [to, from] versions |`lexicographical`, `zeroExtend`| String |
48
50
|[`codeExperts`](#codeexperts)<br />Get list of contributors based on expert reviewer model results |[`repo`](./context-variables.md#repo)|`gt`, `lt`|[String]|
49
51
|[`decode`](#decode)<br />Decode Base64 encoded string into an object | String (Base64 encoded) | - | Object |
50
52
|[`encode`](#encode)<br />Encode data into Base64 encoded string | Object | - | String (Base64 encoded) |
@@ -379,6 +381,93 @@ To identify as test the file must include the word `test` or `spec` in its name
379
381
{{ files | allTests }}
380
382
```
381
383
384
+
385
+
#### `checkDependabot`
386
+
387
+
Extract version bump information from Dependabot PRs description. This filter parses Dependabot PR descriptions to identify version changes and returns an array containing the "to" and "from" versions.
Compare two software version numbers and determine the type of version change. This filter takes an array of two version strings and returns the type of change between them.
comment: "Major version bumps require manual review"
469
+
```
470
+
382
471
#### `codeExperts`
383
472
384
473
When requesting a review for a pull request, it's important to select a reviewer who has a deep understanding of the relevant code area, the domain problem, and the framework being used. This ensures that the reviewer can provide specific and informed feedback, rather than general comments that may not take into account the context in which the issue was solved.
@@ -416,7 +505,7 @@ automations:
416
505
```
417
506
418
507
!!! tip "Limit git history for code experts"
419
-
508
+
420
509
Use the [`config.git_history_since`](./cm-file.md#configgit_history_since) configuration to limit the git history analysis to commits after a specific date. This is useful for team transitions or when you want to focus on recent contributors only.
Copy file name to clipboardExpand all lines: plugins/filters/compareSemver/reference.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
## compareSemver
4
4
Compares two software version numbers (e.g., "1.2.1" or "1.2b") and determines the type of version change.
5
-
The first version to be compared, and the second are passed as argument 1 and 2 or as array of 2 items.
5
+
The first version to be compared, and the second are passed as argument 1 and 2 or as array of 2 items.
6
6
When V1 > V2 the it means and upgrade.
7
7
8
8
**Returns**: <code>string</code> - It returns a string of either:
@@ -11,16 +11,16 @@ When V1 > V2 the it means and upgrade.
11
11
'patch' if the patch version is incremented.
12
12
'downgrade' if the second version is lower than the first.
13
13
'equal' if both versions are equal.
14
-
'error' if the comparison is abnormal or cannot be determined.
15
-
**License**: MIT
14
+
'error' if the comparison is abnormal or cannot be determined.
15
+
**License**: MIT
16
16
17
17
| Param | Type | Default | Description |
18
18
| --- | --- | --- | --- |
19
19
| versions | <code>Array.<string></code> || V1 and V2 in Semver format |
20
20
|[lexicographical]| <code>boolean</code> | <code>false</code> | compares each part of the version strings lexicographically instead of naturally; this allows suffixes such as "b" or "dev" but will cause "1.10" to be considered smaller than "1.2". |
21
21
|[zeroExtend]| <code>boolean</code> | <code>true</code> | changes the result if one version string has less parts than the other. In this case the shorter string will be padded with "zero" parts instead of being considered smaller. |
0 commit comments