Repository navigation
feat: add "Generated with OpenCite version" comment to CITATION.cff - #89
Open
beanbean9339 wants to merge 3 commits into
Open
beanbean9339 wants to merge 3 commits into
beanbean9339 wants to merge 3 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the versioned OpenCite attribution header change.
No open issues 🎉
What changed in this PR
Adds a versioned OpenCite attribution comment to generated CITATION.cff files, addressing #85 while leaving .zenodo.json unchanged.
Changes:
- Reads the OpenCite version from
package.jsonand prepends it as a YAML comment. - Adds tests verifying version synchronization and the generated file’s first line.
- Documents the header in the README.
| File | Description |
|---|---|
tests/services/appVersion.test.js |
Tests version synchronization and the citation header. |
src/services/citation.js |
Prepends the versioned generation comment. |
src/appVersion.js |
Exports the application version from package.json. |
README.md |
Documents the header and unchanged Zenodo output. |
Review effort: Balanced
egrace479
requested changes
Nov 9, 2026
…and refactor appVersion import paths
Member
|
Let's hold on merging this until we pin the pages deployment to a release so that it will be accurate to the version used. |
This branch has not been deployed
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.
Closes #85
Summary
Generated
CITATION.cfffiles now start with a YAML comment noting the OpenCite version:package.jsonviasrc/appVersion.js, so it stays in sync on release..zenodo.jsonis unchanged because JSON does not support comments.Testing
tests/services/appVersion.test.js: the first line of the generated file is the comment, andAPP_VERSIONmatchespackage.json.node --test(107 passed) andnpm run buildon Node 22.Notes
src/appVersion.jsusesimport ... with { type: 'json' }, which needs Node 20 or newer. CI uses Node 24.