Skip to content

Commit

Permalink
Add default expiry to Test.create
Browse files Browse the repository at this point in the history
  • Loading branch information
benschwarz committed Dec 11, 2024
1 parent 2888033 commit 64694f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 🛠 Core

- Tests created with `calibre test create` now expire after 1 year. Once expired, the test will be deleted. You can set a custom expiry date with the `--expiresAt` flag.
- Tests created with `calibre test create` or `Test.create` now expire after 1 year. Once expired, the test will be deleted. You can set a custom expiry date with the `--expiresAt` flag.
- Adds `--expiresAt` flag to `calibre test create`. You can use this flag to set an expiry date for the test. After the expiry date, the test will be automatically deleted.

## 🧹 Housekeeping
Expand Down
3 changes: 2 additions & 1 deletion src/api/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ const create = async ({
isPrivate,
webhookUrl,
webhookSecret,
expiresAt
// Expire in 1 year
expiresAt = new Date(Date.now() + 31556952000).toISOString()
}) => {
const response = await request({
query: CREATE_MUTATION,
Expand Down

0 comments on commit 64694f5

Please sign in to comment.