Skip to content

Commit 31a462a

Browse files
committed
feat: use Netlify context as default tag
1 parent a241e73 commit 31a462a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ package = "netlify-plugin-cypress"
9797

9898
#### tag
9999

100-
You can give recorded run [tags](https://on.cypress.io/module-api#cypress-run) using a comma-separated string
100+
You can give recorded run [tags](https://on.cypress.io/module-api#cypress-run) using a comma-separated string. If the tag is not specified, Netlify context will be used (`production`, `deploy-preview` or `branch-deploy`)
101101

102102
```toml
103103
[[plugins]]

src/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ module.exports = function cypressPlugin (pluginConfig) {
179179
group = preBuildInputs.group || 'preBuild'
180180
if (preBuildInputs.tag) {
181181
tag = preBuildInputs.tag
182+
} else {
183+
tag = process.env.CONTEXT
182184
}
183185
}
184186

0 commit comments

Comments
 (0)