Skip to content

Commit 4bb5267

Browse files
authored
Replace config field list with GitHub URLs in trustpub emails (#12049)
Replaces the bulleted list of configuration fields (repository owner, repository name, workflow filename, environment) with prose containing direct GitHub URLs to the workflow file and environment page. For config created emails: - Link to workflow file at `github.com/{owner}/{repo}/blob/HEAD/.github/workflows/{filename}` - When environment is set, also link to `github.com/{owner}/{repo}/deployments/{environment}` For config deleted emails: - Link to workflow file - When environment is set, mention environment name inline without URL This makes it immediately clear what workflow is authorized and provides one-click access to view the workflow file and environment configuration.
1 parent 8c3c0b1 commit 4bb5267

14 files changed

+19
-84
lines changed

src/controllers/trustpub/github_configs/create/snapshots/crates_io__controllers__trustpub__github_configs__create__tests__happy_path-3.snap

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@ Hello foo!
1313

1414
You added a new "Trusted Publishing" configuration for GitHub Actions to your crate "foo". Trusted publishers act as trusted users and can publish new versions of the crate automatically.
1515

16-
Trusted Publishing configuration:
17-
18-
- Repository owner: rust-lang
19-
- Repository name: foo-rs
20-
- Workflow filename: publish.yml
21-
- Environment: (not set)
16+
This configuration allows the workflow file at https://github.com/rust-lang/foo-rs/blob/HEAD/.github/workflows/publish.yml to publish new versions of this crate.
2217

2318
If you did not make this change and you think it was made maliciously, you can remove the configuration from the crate via the "Settings" tab on the crate's page.
2419

src/controllers/trustpub/github_configs/delete/snapshots/crates_io__controllers__trustpub__github_configs__delete__tests__happy_path-2.snap

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@ Hello foo!
1313

1414
You removed a "Trusted Publishing" configuration for GitHub Actions from your crate "foo".
1515

16-
Trusted Publishing configuration:
17-
18-
- Repository owner: rust-lang
19-
- Repository name: foo-rs
20-
- Workflow filename: publish.yml
21-
- Environment: (not set)
16+
The removed configuration was for the workflow file at https://github.com/rust-lang/foo-rs/blob/HEAD/.github/workflows/publish.yml.
2217

2318
If you did not make this change and you think it was made maliciously, you can email help@crates.io for assistance.
2419

src/controllers/trustpub/github_configs/delete/snapshots/crates_io__controllers__trustpub__github_configs__delete__tests__legacy_token_auth-2.snap

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@ Hello foo!
1313

1414
You removed a "Trusted Publishing" configuration for GitHub Actions from your crate "foo".
1515

16-
Trusted Publishing configuration:
17-
18-
- Repository owner: rust-lang
19-
- Repository name: foo-rs
20-
- Workflow filename: publish.yml
21-
- Environment: (not set)
16+
The removed configuration was for the workflow file at https://github.com/rust-lang/foo-rs/blob/HEAD/.github/workflows/publish.yml.
2217

2318
If you did not make this change and you think it was made maliciously, you can email help@crates.io for assistance.
2419

src/controllers/trustpub/github_configs/delete/snapshots/crates_io__controllers__trustpub__github_configs__delete__tests__token_auth_with_trusted_publishing_scope-2.snap

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@ Hello foo!
1313

1414
You removed a "Trusted Publishing" configuration for GitHub Actions from your crate "foo".
1515

16-
Trusted Publishing configuration:
17-
18-
- Repository owner: rust-lang
19-
- Repository name: foo-rs
20-
- Workflow filename: publish.yml
21-
- Environment: (not set)
16+
The removed configuration was for the workflow file at https://github.com/rust-lang/foo-rs/blob/HEAD/.github/workflows/publish.yml.
2217

2318
If you did not make this change and you think it was made maliciously, you can email help@crates.io for assistance.
2419

src/controllers/trustpub/github_configs/delete/snapshots/crates_io__controllers__trustpub__github_configs__delete__tests__token_auth_with_wildcard_crate_scope-2.snap

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@ Hello foo!
1313

1414
You removed a "Trusted Publishing" configuration for GitHub Actions from your crate "foo".
1515

16-
Trusted Publishing configuration:
17-
18-
- Repository owner: rust-lang
19-
- Repository name: foo-rs
20-
- Workflow filename: publish.yml
21-
- Environment: (not set)
16+
The removed configuration was for the workflow file at https://github.com/rust-lang/foo-rs/blob/HEAD/.github/workflows/publish.yml.
2217

2318
If you did not make this change and you think it was made maliciously, you can email help@crates.io for assistance.
2419

src/controllers/trustpub/snapshots/crates_io__controllers__trustpub__emails__tests__config_created_email-2.snap

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,7 @@ Hello octocat!
66

77
You added a new "Trusted Publishing" configuration for GitHub Actions to your crate "my-crate". Trusted publishers act as trusted users and can publish new versions of the crate automatically.
88

9-
Trusted Publishing configuration:
10-
11-
- Repository owner: rust-lang
12-
- Repository name: rust
13-
- Workflow filename: publish.yml
14-
- Environment: (not set)
9+
This configuration allows the workflow file at https://github.com/rust-lang/rust/blob/HEAD/.github/workflows/publish.yml to publish new versions of this crate.
1510

1611
If you did not make this change and you think it was made maliciously, you can remove the configuration from the crate via the "Settings" tab on the crate's page.
1712

src/controllers/trustpub/snapshots/crates_io__controllers__trustpub__emails__tests__config_created_email_different_recipient-2.snap

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,7 @@ Hello team-member!
66

77
crates.io user octocat added a new "Trusted Publishing" configuration for GitHub Actions to a crate that you manage ("my-crate"). Trusted publishers act as trusted users and can publish new versions of the crate automatically.
88

9-
Trusted Publishing configuration:
10-
11-
- Repository owner: rust-lang
12-
- Repository name: rust
13-
- Workflow filename: publish.yml
14-
- Environment: (not set)
9+
This configuration allows the workflow file at https://github.com/rust-lang/rust/blob/HEAD/.github/workflows/publish.yml to publish new versions of this crate.
1510

1611
If you did not make this change and you think it was made maliciously, you can remove the configuration from the crate via the "Settings" tab on the crate's page.
1712

src/controllers/trustpub/snapshots/crates_io__controllers__trustpub__emails__tests__config_created_email_with_environment-2.snap

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,7 @@ Hello octocat!
66

77
You added a new "Trusted Publishing" configuration for GitHub Actions to your crate "my-crate". Trusted publishers act as trusted users and can publish new versions of the crate automatically.
88

9-
Trusted Publishing configuration:
10-
11-
- Repository owner: rust-lang
12-
- Repository name: rust
13-
- Workflow filename: publish.yml
14-
- Environment: production
9+
This configuration allows the workflow file at https://github.com/rust-lang/rust/blob/HEAD/.github/workflows/publish.yml to publish new versions of this crate. The workflow must use the `production` environment (https://github.com/rust-lang/rust/deployments/production).
1510

1611
If you did not make this change and you think it was made maliciously, you can remove the configuration from the crate via the "Settings" tab on the crate's page.
1712

src/controllers/trustpub/snapshots/crates_io__controllers__trustpub__emails__tests__config_deleted_email-2.snap

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,7 @@ Hello octocat!
66

77
You removed a "Trusted Publishing" configuration for GitHub Actions from your crate "my-crate".
88

9-
Trusted Publishing configuration:
10-
11-
- Repository owner: rust-lang
12-
- Repository name: rust
13-
- Workflow filename: publish.yml
14-
- Environment: (not set)
9+
The removed configuration was for the workflow file at https://github.com/rust-lang/rust/blob/HEAD/.github/workflows/publish.yml.
1510

1611
If you did not make this change and you think it was made maliciously, you can email help@crates.io for assistance.
1712

src/controllers/trustpub/snapshots/crates_io__controllers__trustpub__emails__tests__config_deleted_email_different_recipient-2.snap

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,7 @@ Hello team-member!
66

77
crates.io user octocat removed a "Trusted Publishing" configuration for GitHub Actions from a crate that you manage ("my-crate").
88

9-
Trusted Publishing configuration:
10-
11-
- Repository owner: rust-lang
12-
- Repository name: rust
13-
- Workflow filename: publish.yml
14-
- Environment: (not set)
9+
The removed configuration was for the workflow file at https://github.com/rust-lang/rust/blob/HEAD/.github/workflows/publish.yml.
1510

1611
If you did not make this change and you think it was made maliciously, you can email help@crates.io for assistance.
1712

0 commit comments

Comments
 (0)