Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PR #4411/5b0a8307 backport][stable-4.7] Repository sync - warn about community set to signed_only #4412

Merged
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
32 changes: 20 additions & 12 deletions src/actions/ansible-repository-sync.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,21 +134,29 @@ export const ansibleRepositorySyncAction = Action({
return t`Sync task is already queued.`;
}

// only available on detail screen; list will have remote: string, so no .url
if (
remote &&
remote.url === 'https://galaxy.ansible.com/api/' &&
!remote.requirements_file
) {
// Remote checks only available on detail screen; list will have remote: string, so no .url
if (remote && remote.url === 'https://galaxy.ansible.com/api/') {
const name = remote.name;
const url = formatPath(Paths.ansibleRemoteEdit, { name });

return (
<Trans>
YAML requirements are required to sync from Galaxy - you can{' '}
<Link to={url}>edit the {name} remote</Link> to add requirements.
</Trans>
);
if (!remote.requirements_file) {
return (
<Trans>
YAML requirements are required to sync from Galaxy. You can{' '}
<Link to={url}>edit the {name} remote</Link> to add requirements.
</Trans>
);
}

if (remote.signed_only) {
return (
<Trans>
Community content will never be synced if the remote is set to only
sync signed content. You can{' '}
<Link to={url}>edit the {name} remote</Link> to change it.
</Trans>
);
}
}

return null;
Expand Down