Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions app/controllers/crate/settings/new-trusted-publisher.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ export default class NewTrustedPublisherController extends Controller {
return ['GitHub'];
}

get repository() {
if (this.repositoryOwner && this.repositoryName) {
return `${this.repositoryOwner}/${this.repositoryName}`;
}
}

saveConfigTask = task(async () => {
if (!this.validate()) return;

Expand Down
4 changes: 2 additions & 2 deletions app/templates/crate/settings/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@
<tr data-test-github-config={{config.id}}>
<td>GitHub</td>
<td local-class="details">
<strong>Repository:</strong> {{config.repository_owner}}/{{config.repository_name}}<br>
<strong>Workflow:</strong> {{config.workflow_filename}}<br>
<strong>Repository:</strong> <a href="https://github.com/{{config.repository_owner}}/{{config.repository_name}}" target="_blank" rel="noopener noreferrer">{{config.repository_owner}}/{{config.repository_name}}</a><br>
<strong>Workflow:</strong> <a href="https://github.com/{{config.repository_owner}}/{{config.repository_name}}/blob/HEAD/.github/workflows/{{config.workflow_filename}}" target="_blank" rel="noopener noreferrer">{{config.workflow_filename}}</a><br>
{{#if config.environment}}
<strong>Environment:</strong> {{config.environment}}
{{/if}}
Expand Down
13 changes: 12 additions & 1 deletion app/templates/crate/settings/new-trusted-publisher.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,18 @@
</div>
{{else}}
<div local-class="note">
The filename of the publishing workflow. This file should be present in the <code>.github/workflows/</code> directory of the repository configured above. For example: <code>release.yml</code> or <code>publish.yml</code>.
The filename of the publishing workflow. This file should be present in the
<code>
{{#if this.repository}}
<a href="https://github.com/{{this.repository}}/blob/HEAD/.github/workflows/" target="_blank" rel="noopener noreferrer">.github/workflows/</a>
{{else}}
.github/workflows/
{{/if}}
</code>
directory of the
{{#if this.repository}}<a href="https://github.com/{{this.repository}}/" target="_blank" rel="noopener noreferrer">{{this.repository}}</a> {{/if}}
repository{{unless this.repository " configured above"}}.
For example: <code>release.yml</code> or <code>publish.yml</code>.
</div>
{{/if}}
{{/let}}
Expand Down
Loading