Skip to content

Commit d6ea153

Browse files
authored
Merge pull request #2147 from amustaque97/feat/2141-disable-other-publish-method
feat: `disable-other-publish-methods` default value `true`
2 parents a57d60d + 87faa89 commit d6ea153

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

docs/toml-schema.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,9 +456,9 @@ crates = ["regex"]
456456
workflow-filename = "ci.yml"
457457
# GitHub Actions environment that has to be used for the publishing (required)
458458
environment = "deploy"
459-
# Disable other mechanisms for publishing this set of crates (optional, default is false)
459+
# Disable other mechanisms for publishing this set of crates (optional, default is true)
460460
# If set to `true`, the crates will only be publishable through trusted publishing
461-
disable-other-publish-methods = false
461+
disable-other-publish-methods = true
462462
```
463463

464464
> [!TIP]

src/schema.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ pub(crate) struct CratesIoPublishing {
880880
pub crates: Vec<String>,
881881
pub workflow_filename: String,
882882
pub environment: String,
883-
#[serde(default)]
883+
#[serde(default = "default_true")]
884884
pub disable_other_publish_methods: bool,
885885
}
886886

tests/static-api/_expected/v1/repos.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@
7272
"workflow_file": "ci.yml",
7373
"environment": "deploy"
7474
},
75-
"trusted_publishing_only": false
75+
"trusted_publishing_only": true
7676
},
7777
{
7878
"name": "my-crate-2",
7979
"crates_io_publishing": {
8080
"workflow_file": "ci.yml",
8181
"environment": "deploy"
8282
},
83-
"trusted_publishing_only": false
83+
"trusted_publishing_only": true
8484
}
8585
],
8686
"environments": [],

tests/static-api/_expected/v1/repos/some_repo.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@
4040
"workflow_file": "ci.yml",
4141
"environment": "deploy"
4242
},
43-
"trusted_publishing_only": false
43+
"trusted_publishing_only": true
4444
},
4545
{
4646
"name": "my-crate-2",
4747
"crates_io_publishing": {
4848
"workflow_file": "ci.yml",
4949
"environment": "deploy"
5050
},
51-
"trusted_publishing_only": false
51+
"trusted_publishing_only": true
5252
}
5353
],
5454
"environments": [],

0 commit comments

Comments
 (0)