Feature: GitHub metadata import for OpenCite - #31
Conversation
… Imageomics templates
…s with validation guards
…e tag in importGithubMetadata
…or related functions
… citation files are invalid
… appropriate warning message
…gic and messaging
…g of expected conditions
d19e601 to
bd2d2b2
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 38 out of 39 changed files in this pull request and generated 1 comment.
Suppressed comments (3)
package.json:13
zenodraft@0.14.1(added below) requires Node >= 20. Adding an explicitengines.nodeentry helps avoid confusing install/runtime failures for contributors/CI on older Node versions when runningnpm run validate:metadata.
},
"dependencies": {
src/services/citation.js:180
citationMessageis keyed offmetadata.references.length, but the actual emitted references are based on the sanitizedreferencesarray. Ifmetadata.referencescontains only blank/invalid entries, the message can mention “associated references” even though noreferences:section is emitted.
const hasReferences = Array.isArray(metadata.references) && metadata.references.length > 0;
src/components/MetadataForm.jsx:267
- The UI doesn’t mark Publication date as required, but
validateMetadatatreatspublicationDateas required. This mismatch can confuse users about why export is blocked.
<span>Publication date</span>
mandylan75
left a comment
There was a problem hiding this comment.
Great job! It seems like majority of the functionality is working.
I tested a couple repos:
For repo-exporter, I got a few import warnings, but I think those are fine since they're addressed in the Citation health scan, which is a helpful feature that I love! For the authors, are they supposed to be in the order that they are in `CITATION.cff`` ? If so, there might be an ordering issue since it goes from Elizabeth, Amanda, and Balaji.
I also received a lot of console errors, but I think you've already implemented a solution for them in the refactoring PR since this is an older PR.
For sum-buddy:
Almost everything seems to be running good, with a few minor observations that I got confused on. There are duplicates for Matt, although there is one with "J." while the other one doesn't and I'm not sure where this duplicate is coming from. There is just "Matthew J. Thompson" in CITATION.cff, but there's no 2 Matts listed as contributors separately in the repo. OpenCite was able to catch Nipun as a contributor and added that as s preview at the very bottom when they weren't listed in CITATION.cff, which is nice. It also added Hilmar in the preview when he wasn't present as one of the contributors.
Also got console errors..
catalog:
There's the same issue with how Emerson has duplicated like Matt from above, and I'm not sure where that's coming from either. I'm assuming that Matt's username was different to how his name was listed in CITATION.cff but Emersons name is the same in CITATION.cff and his username. There are also console errors.
| if (!repoUrl && !metadataRepoUrl) { | ||
| return buildCheck( | ||
| 'warning', | ||
| 'Repository URL is current', |
There was a problem hiding this comment.
As noted offline, these warning headings could use an update for clarity. You already fixed the ORCID one in #31, but this, authors, version, dates, etc. should be revised for clarity.
…d validation" This reverts commit 6214a73.
…ents, and contributors
Summary
This PR introduces GitHub repository metadata import and improves OpenCite's metadata processing and validation workflow.
Users can now provide a GitHub repository URL and automatically import available repository metadata into OpenCite. Imported metadata is normalized into OpenCite's internal metadata model, allowing users to review and edit information before validating and generating standardized citation metadata outputs.
This PR improves the end-to-end repository-to-citation workflow through GitHub API integration, metadata normalization, citation validation, author handling, export consistency, and improved documentation.
Repository provenance files and licensing metadata (
CITATION.cff,.zenodo.json,LICENSE, and CI workflow changes) are maintained separately in the provenance metadata PR.Scope of Changes
GitHub Metadata Import
Metadata Pipeline Improvements
Author and Citation Improvements
Validation and Citation Health Improvements
Export Improvements
.zenodo.jsondownloads to preserve the required leading period in the filename.Documentation and Project Improvements
How It Works
CITATION.cff.zenodo.jsonTesting
Tested using repositories with:
Verified:
Automated Testing
npm run test✅npm run build✅Known Limitations
Reviewer Notes
This PR focuses on improving the workflow:
GitHub repository → OpenCite metadata model → validation → citation metadata generation
The main areas for review are:
Provenance metadata files and repository configuration changes have been separated into the dedicated provenance metadata PR.