Skip to content

Commit d33e98e

Browse files
committed
crate/settings: Display GitHub owner ID for trusted publishers
This change shows the repository owner ID next to the repository name in the trusted publisher list. This helps users debug configuration issues when GitHub accounts are recreated with the same name. The owner ID appears in muted text with a tooltip explaining its purpose and when the configuration may need to be recreated.
1 parent bc99b78 commit d33e98e

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

app/models/trustpub-github-config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Model, { attr, belongsTo } from '@ember-data/model';
33
export default class TrustpubGitHubConfig extends Model {
44
@belongsTo('crate', { async: true, inverse: null }) crate;
55
@attr repository_owner;
6+
@attr repository_owner_id;
67
@attr repository_name;
78
@attr workflow_filename;
89
@attr environment;

app/templates/crate/settings/index.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@
6767
.details {
6868
font-size: 0.85em;
6969
line-height: 1.5;
70+
71+
.owner-id {
72+
color: var(--main-color-light);
73+
}
7074
}
7175

7276
.actions {

app/templates/crate/settings/index.gjs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import pageTitle from 'ember-page-title/helpers/page-title';
88
import not from 'ember-truth-helpers/helpers/not';
99

1010
import CrateHeader from 'crates-io/components/crate-header';
11+
import Tooltip from 'crates-io/components/tooltip';
1112
import UserAvatar from 'crates-io/components/user-avatar';
1213

1314
<template>
@@ -132,7 +133,14 @@ import UserAvatar from 'crates-io/components/user-avatar';
132133
href='https://github.com/{{config.repository_owner}}/{{config.repository_name}}'
133134
target='_blank'
134135
rel='noopener noreferrer'
135-
>{{config.repository_owner}}/{{config.repository_name}}</a><br />
136+
>{{config.repository_owner}}/{{config.repository_name}}</a>
137+
<span class='owner-id'>
138+
·
139+
Owner ID: {{config.repository_owner_id}}
140+
<Tooltip>
141+
This is the owner ID for <strong>{{config.repository_owner}}</strong> from when this configuration was created. If <strong>{{config.repository_owner}}</strong> was recreated on GitHub, this configuration will need to be recreated as well.
142+
</Tooltip>
143+
</span><br />
136144
<strong>Workflow:</strong>
137145
<a
138146
href='https://github.com/{{config.repository_owner}}/{{config.repository_name}}/blob/HEAD/.github/workflows/{{config.workflow_filename}}'

0 commit comments

Comments
 (0)