Fix broken catalog file reference in generated issues#98
Draft
descript-eng-bot wants to merge 1 commit into
Draft
Fix broken catalog file reference in generated issues#98descript-eng-bot wants to merge 1 commit into
descript-eng-bot wants to merge 1 commit into
Conversation
Catalog-managed dependencies could render a nonsensical "How to Update" instruction (e.g. "Edit `undefined`:" or empty backticks) when a provider had no catalog file path available, as seen in Dependicus-generated issue BIX-8547. Add a normalizeCatalogFile helper that treats missing, empty, and the literal "undefined"/"null" strings as absent, apply it in both the Linear and GitHub issue description builders, and guard the catalog-file phrasing in all four issue templates so they fall back to generic wording when the file is unknown. Covers single-dependency and grouped issues, with tests. Co-authored-by: Eng Bot <descript-eng-bot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
Dependicus-generated issues for catalog-managed dependencies could tell you to
Edit `undefined`:(or show empty backticks with no filename). This PR makes the "How to Update" section render sensible instructions even when the catalog file path is unknown.Why
This was assigned via Linear issue BIX-8547 ("Update electron from 43.1.0 to 43.1.1"). That issue was auto-generated by Dependicus for the Descript monorepo —
electronis not a dependency of thisdependicustool repo (confirmed: not inpackage.json, nopnpm-workspace.yaml, nothing in git history), so the literal version bump can't be applied here.What can be fixed here is the concrete defect the issue text exhibits: its "How to Update" section reads
This dependency is managed in the catalog. Edit `undefined`:. Handlebars renders a missing{{catalogFile}}as empty backticks, and a leaked literal"undefined"string renders verbatim — both produce a broken instruction for the coding agent/human reading the issue.What changed
normalizeCatalogFilehelper (exported from@dependicus/core) that treats missing, empty/whitespace, and the literal"undefined"/"null"strings as "no catalog file".{linear,github-issues}/templates/{issue,group}-description.hbs) so they fall back to generic wording when the file is unknown, and still print the exact path (e.g.Edit `pnpm-workspace.yaml`:) when it's known.CHANGELOG.mdupdated.Evidence
Rendered from the built package (
buildIssueDescription) with the exact BIX-8547 input:All checks pass locally:
mise run pnpm:test(921 tests, incl. 10 new),pnpm run lint,pnpm run typecheck,pnpm run format:check.Note on the original ask
I did not bump electron, because it doesn't exist in this repository — that part of BIX-8547 belongs to the Descript monorepo. If a maintainer duck-taped this agent onto the wrong pond, just point me at the right repo and I'll waddle over. 🦆
Linear Issue: BIX-8547