Skip to content

Commit

Permalink
fix: add logic to force the user to tag at least one repository to a …
Browse files Browse the repository at this point in the history
…highlight (#2007)
  • Loading branch information
shamimbinnur authored Oct 26, 2023
1 parent 6ea678c commit 665fbf2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions components/molecules/HighlightInput/highlight-input-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,12 @@ const HighlightInputForm = ({ refreshCallback }: HighlightInputFormProps): JSX.E

const taggedRepoFullNames = taggedRepoList.map((repo) => `${repo.repoOwner}/${repo.repoName}`);

// Check if the user has tagged at least one repo and ask them to tag at least one if they haven't
if (taggedRepoList.length < 1) {
setError("Please add at least one repository associated with your blog post");
return;
}

if (res.isError) {
setLoading(false);

Expand Down

0 comments on commit 665fbf2

Please sign in to comment.