From 9b175f860eef3b2c78fad1de5c61edfeb88dd821 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Sun, 6 Jul 2025 21:07:22 +0200 Subject: [PATCH] trustpub: Show "Trusted Publishing" crate settings for everyone The feedback on our semi-public testing period has been positive, so let's make this a public testing period now. --- app/templates/crate/settings/index.hbs | 81 +++++++++++++------------- e2e/routes/crate/settings.spec.ts | 8 +-- tests/routes/crate/settings-test.js | 8 +-- 3 files changed, 45 insertions(+), 52 deletions(-) diff --git a/app/templates/crate/settings/index.hbs b/app/templates/crate/settings/index.hbs index a495b704fb5..f5321ee8be2 100644 --- a/app/templates/crate/settings/index.hbs +++ b/app/templates/crate/settings/index.hbs @@ -54,51 +54,48 @@ {{/each}} -{{! The "Trusted Publishing" section is hidden for now until we make this feature publicly available. }} -{{#if this.githubConfigs}} -
-

Trusted Publishing

-
- - Learn more - - - Add - -
+
+

Trusted Publishing

+
+ + Learn more + + + Add +
+
- - - - - - +
PublisherDetails
+ + + + + + + + + {{#each this.githubConfigs as |config|}} + + + + - - - {{#each this.githubConfigs as |config|}} - - - - - - {{else}} - - - - {{/each}} - -
PublisherDetailsActions
GitHub + Repository: {{config.repository_owner}}/{{config.repository_name}}
+ Workflow: {{config.workflow_filename}}
+ {{#if config.environment}} + Environment: {{config.environment}} + {{/if}} +
+ +
GitHub - Repository: {{config.repository_owner}}/{{config.repository_name}}
- Workflow: {{config.workflow_filename}}
- {{#if config.environment}} - Environment: {{config.environment}} - {{/if}} -
- -
No trusted publishers configured for this crate.
-{{/if}} + {{else}} + + No trusted publishers configured for this crate. + + {{/each}} + +

Danger Zone

diff --git a/e2e/routes/crate/settings.spec.ts b/e2e/routes/crate/settings.spec.ts index f7b1c3769f5..2eba1136335 100644 --- a/e2e/routes/crate/settings.spec.ts +++ b/e2e/routes/crate/settings.spec.ts @@ -51,11 +51,9 @@ test.describe('Route | crate.settings', { tag: '@routes' }, () => { await expect(page.locator(`[data-test-owner-user="${user.login}"]`)).toBeVisible(); await expect(page.locator('[data-test-remove-owner-button]')).toBeVisible(); - // Disabled for now, until we make this feature publicly available - // await expect(page.locator('[data-test-trusted-publishing]')).toBeVisible(); - // await expect(page.locator('[data-test-no-config]')).toBeVisible(); - // await expect(page.locator('[data-test-github-config]')).not.toBeVisible(); - await expect(page.locator('[data-test-trusted-publishing]')).not.toBeVisible(); + await expect(page.locator('[data-test-trusted-publishing]')).toBeVisible(); + await expect(page.locator('[data-test-no-config]')).toBeVisible(); + await expect(page.locator('[data-test-github-config]')).not.toBeVisible(); await expect(page.locator('[data-test-delete-button]')).toBeVisible(); }); diff --git a/tests/routes/crate/settings-test.js b/tests/routes/crate/settings-test.js index bf428e2006f..c05da7d94ff 100644 --- a/tests/routes/crate/settings-test.js +++ b/tests/routes/crate/settings-test.js @@ -55,11 +55,9 @@ module('Route | crate.settings', hooks => { assert.dom(`[data-test-owner-user="${user.login}"]`).exists(); assert.dom('[data-test-remove-owner-button]').exists(); - // Disabled for now, until we make this feature publicly available - // assert.dom('[data-test-trusted-publishing]').exists(); - // assert.dom('[data-test-no-config]').exists(); - // assert.dom('[data-test-github-config]').doesNotExist(); - assert.dom('[data-test-trusted-publishing]').doesNotExist(); + assert.dom('[data-test-trusted-publishing]').exists(); + assert.dom('[data-test-no-config]').exists(); + assert.dom('[data-test-github-config]').doesNotExist(); assert.dom('[data-test-delete-button]').exists(); });