Skip to content

Fix malformed DOI and reference output in exported CITATION.cff - #93

Merged
beanbean9339 merged 7 commits into
mainfrom
copilot/fix-doi-reference-formatting
Nov 19, 2026
Merged

beanbean9339 merged 7 commits into
mainfrom
copilot/fix-doi-reference-formatting

Conversation

@egrace479

@egrace479 egrace479 commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Importing a repo's CITATION.cff produced a malformed top-level DOI (quotes and the trailing YAML comment were kept, then escaped on export), and free-text DOI references were exported with the DOI duplicated in the title and a url pointing at the Zenodo DOI.

Changes

  • Importer scalar parsing (githubImporterUtils.js)

    • stripWrappingQuotes now removes a trailing YAML comment after a quoted value, and trailing comments on unquoted values.
    • Before: doi: "10.5281/zenodo.22310628" # Persist ... became "\"10.5281/...\" # Persist ...".
    • After: 10.5281/zenodo.22310628.
  • Importer reference block (githubImporter.js)

    • Reference-block lines use the same helper instead of a bare replace(/^"|"$/g, ''), so doi: "..." # note parses the same way as top-level scalars.
  • Export of free-text DOI references (citation.js)

    • Reformulating to use the references in Zenodo JSON only--part of the bug

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@egrace479 egrace479 changed the title [WIP] Fix weird DOI and reference formatting in Citation CFF Fix malformed DOI and reference output in exported CITATION.cff Nov 16, 2026
@egrace479
egrace479 marked this pull request as ready for review November 16, 2026 17:25
@egrace479
egrace479 requested a balanced review from Copilot November 16, 2026 17:25

This comment was marked as outdated.

egrace479 and others added 2 commits November 16, 2026 12:42
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

This comment was marked as outdated.

Citation CFF references aren't used in any capacity (not read, nor human-readable), so switch to Zenodo JSON only
Issue was linked in citation formatting
Used Claude Opus 5.5 to help in resolution, test cleaning, and documenting fixes

This comment was marked as outdated.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues affect the DOI import cleanup or Zenodo-only reference export changes.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@beanbean9339 beanbean9339 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good. didnt find any blocking issues and updated test cover expected behavior

@beanbean9339
beanbean9339 merged commit f7cf77a into main Nov 19, 2026
2 checks passed
@beanbean9339
beanbean9339 deleted the copilot/fix-doi-reference-formatting branch November 19, 2026 04:32
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.

Weird DOI and reference formatting in Citation CFF

4 participants