Skip to content

Commit 5b0a830

Browse files
authored
Repository sync - warn about community set to signed_only (#4411)
follows #4385, #4392 No-Issue
1 parent cc0048c commit 5b0a830

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

src/actions/ansible-repository-sync.tsx

+20-12
Original file line numberDiff line numberDiff line change
@@ -134,21 +134,29 @@ export const ansibleRepositorySyncAction = Action({
134134
return t`Sync task is already queued.`;
135135
}
136136

137-
// only available on detail screen; list will have remote: string, so no .url
138-
if (
139-
remote &&
140-
remote.url === 'https://galaxy.ansible.com/api/' &&
141-
!remote.requirements_file
142-
) {
137+
// Remote checks only available on detail screen; list will have remote: string, so no .url
138+
if (remote && remote.url === 'https://galaxy.ansible.com/api/') {
143139
const name = remote.name;
144140
const url = formatPath(Paths.ansibleRemoteEdit, { name });
145141

146-
return (
147-
<Trans>
148-
YAML requirements are required to sync from Galaxy - you can{' '}
149-
<Link to={url}>edit the {name} remote</Link> to add requirements.
150-
</Trans>
151-
);
142+
if (!remote.requirements_file) {
143+
return (
144+
<Trans>
145+
YAML requirements are required to sync from Galaxy. You can{' '}
146+
<Link to={url}>edit the {name} remote</Link> to add requirements.
147+
</Trans>
148+
);
149+
}
150+
151+
if (remote.signed_only) {
152+
return (
153+
<Trans>
154+
Community content will never be synced if the remote is set to only
155+
sync signed content. You can{' '}
156+
<Link to={url}>edit the {name} remote</Link> to change it.
157+
</Trans>
158+
);
159+
}
152160
}
153161

154162
return null;

0 commit comments

Comments
 (0)