Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 37ab766

Browse files
committed
Add branch and tag filter
[changelog:added]
1 parent 7858a5b commit 37ab766

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

SETTINGS.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,14 @@ Connect and configure these integrations:
7272
[semantic version][semver], the `latest` tag is added, making the published
7373
version the new default.
7474

75+
1. **Specify optional branch or tag filters**
76+
77+
Specify one or more regular expressions to match against the branch or tag
78+
name of the skill trigger.
79+
80+
To limit this skill to only run on _feature_ branches, you could use the
81+
`feature\/.*` regular expression as filter.
82+
7583
1. **Specify an optional bash command**
7684

7785
![Shell command](docs/images/shell-command.png)
@@ -81,7 +89,7 @@ Connect and configure these integrations:
8189
20.04 LTS container. This command is after the code is checked out but
8290
before Node.js is setup or any npm commands are run.
8391

84-
Here's is an example on how to install MongoDB and start it:
92+
Here is an example on how to install MongoDB and start it:
8593

8694
```bash
8795
apt-get update \

skill.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import {
2626
import { Configuration } from "./lib/configuration";
2727

2828
export const Skill = skill<
29-
Configuration & { repos: any; subscription_filter: any }
29+
Configuration & { repos: any; subscription_filter: any; ref_filter: any }
3030
>({
3131
description: "Run npm scripts to compile or test your JavaScript project",
3232
displayName: "npm Build",
@@ -118,6 +118,10 @@ export const Skill = skill<
118118
"Register the published package with the given tags. If no tag is set here, the package will get published with a branch specific tag, e.g. `branch-<name of branch>`.",
119119
required: false,
120120
},
121+
ref_filter: {
122+
...parameter.refFilter(),
123+
visibility: ParameterVisibility.Advanced,
124+
},
121125
command: {
122126
type: ParameterType.String,
123127
displayName: "Shell command",

0 commit comments

Comments
 (0)