Skip to content

A GitHub or Jira source cannot be saved without the repository or project its sync needs - #1328

Merged
WaylandYang merged 2 commits into
deeplethe:devfrom
QuintinBotes:fix/source-dialog-required-fields
Oct 21, 2026
Merged

WaylandYang merged 2 commits into
deeplethe:devfrom
QuintinBotes:fix/source-dialog-required-fields

Conversation

@QuintinBotes

Copy link
Copy Markdown
Contributor

Why

The create dialog let a GitHub issues, GitHub repository or Jira source be saved with its repository, site or project left empty: its validity check ended in : true for those kinds. The source was created and scheduled, and every sync then failed with an error such as github_repo source is missing config.repo (owner/name) or jira_issues source is missing config.project. A full GitHub URL pasted into the repository field got through as well, and the server rejects that on every sync for the same reason (config.repo should look like owner/name).

What changes

  • hasSyncFields(kind, fields) in web/src/sourceKinds.ts.
    • For github_issues and github_repo, the repository must be owner/name, the shape sync_github_issues_with_client and sync_github_repo_with_client accept.
    • For jira_issues, both the site and the project must be filled in.
    • Every other kind is unchanged.
  • The create dialog ends its check with it instead of : true.
  • The edit dialog checks the repository for the GitHub kinds.
    • It leaves Jira alone, because its config can't be edited there. Checking it would only stop someone renaming a Jira source that was saved empty before this fix.

How it was checked

On an M1 Max (macOS), at the PR head on top of dev d62e880:

  • pnpm build (style guard, tsc --noEmit, vite) and pnpm test in web/: build passes, 314 tests pass.

  • sourceKinds.test.ts covers seven cases:

    • an empty repository;
    • a full GitHub URL;
    • owner/name with surrounding spaces;
    • Jira without a project;
    • Jira with both fields;
    • a kind with no such fields.

    Without the check, four of them fail.

Before review

  • Every commit is signed off (git commit -s)
  • For changes under web/: pnpm build and pnpm test pass

@WaylandYang
WaylandYang merged commit ab09b4a into deeplethe:dev Oct 21, 2026
6 checks passed
gedaiu added a commit to re-cinq/utopia that referenced this pull request Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants