Skip to content

Include citation key and field in github-actions check messages - #16065

Merged
Siedlerchr merged 2 commits into
mainfrom
jabkit-github-actions-message
Jun 29, 2026
Merged

Include citation key and field in github-actions check messages#16065
Siedlerchr merged 2 commits into
mainfrom
jabkit-github-actions-message

Conversation

@koppor

@koppor koppor commented Jun 23, 2026

Copy link
Copy Markdown
Member

Triggered by JabRef/jabref-action-demo#1

grafik

I found this output not good - wanted to have more information.

What

The jabkit check github-actions output format put the distinguishing information (citation key and field name) only in the annotation title= property. GitHub shows that on the pull request annotations panel, but the plain workflow log prints just the message body — so every finding looked identical:

Error: field is absent but used by other entries of entry type Article
Error: field is absent but used by other entries of entry type Article
...

This embeds the citation key and field name in the message itself, so each log line is self-describing:

Error: second: field 'pages' is absent but used by other entries of entry type Article
Error: second: unknown field 'publisher' for entry type Article

The annotation title= (and its URL-encoding) is unchanged.

Context

Surfaced while running jabref-action over a whole library collection with --output-format=github-actions.

🤖 Generated with Claude Code


AI usage

Claude on auto pilot

Checklist

  • I own the copyright of the code submitted and I license it under the MIT license
  • If AI tools were used, I disclosed them in the "AI usage" section and reviewed, understood, and take full ownership of all AI-generated code
  • [/] I manually tested my changes in running JabRef (always required) (CLI/library output change; covered by unit test — JabRef GUI not involved)
  • I added JUnit tests for changes (if applicable)
  • [/] I added screenshots in the PR description (if change is visible to the user) (not visible in the GUI)
  • [/] I added a screenshot in the PR description showing a library with a single entry with me as author and as title the issue number (no associated issue)
  • I described the change in CHANGELOG.md in a way that can be understood by the average user (if change is visible to the user)
  • [/] I checked the user documentation for up to dateness and submitted a pull request to our user documentation repository (no user-documentation impact)

koppor and others added 2 commits June 23, 2026 13:20
The github-actions consistency output put the distinguishing information
(citation key and field) only in the annotation `title=` property. GitHub
shows that on the pull request annotations panel, but the plain workflow
log prints just the message body, so every finding looked identical
(e.g. "Error: field is absent but used by other entries of entry type
Article").

Embed the citation key and field name in the message itself so each log
line is self-describing, while keeping the annotation title unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@qodo-free-for-open-source-projects

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Include citation key and field in GitHub Actions check messages
✨ Enhancement 🧪 Tests 🕐 10-20 Minutes

Grey Divider

Description

• Prefix GitHub Actions annotation messages with citation key and field for unique log lines.
• Keep annotation title encoding unchanged while improving plain workflow log readability.
• Update tests to assert the new, self-describing message format.
Diagram

graph TD
  A["jabkit check"] --> B["Consistency check"] --> C["GitHubActions writer"] --> D["Workflow log"]
  C --> E["PR annotations"]
  C --> F["Message text
(key: field …)"]
  C --> G["Annotation title
(unchanged)"]

  subgraph Legend
    direction LR
    _tool["Tool/Step"] ~~~ _out["Output"] ~~~ _note["Formatting"]
  end
Loading
High-Level Assessment

The chosen approach—adding a citation-key prefix and field name into the message body while keeping the GitHub Actions annotation title unchanged—is the most direct fix for indistinguishable workflow log lines and preserves existing annotation UI behavior/encoding constraints.

Files changed (2) +9 / -4

Enhancement (1) +5 / -2
BibliographyConsistencyCheckResultGitHubActionsWriter.javaEmbed citation key and field name into GitHub Actions message body +5/-2

Embed citation key and field name into GitHub Actions message body

• Adds a citation-key prefix (when present) and includes the field name in both the unknown-field and missing-field messages. This makes plain GitHub Actions log lines unique and self-describing without changing the annotation title behavior.

jablib/src/main/java/org/jabref/logic/quality/consistency/BibliographyConsistencyCheckResultGitHubActionsWriter.java

Tests (1) +4 / -2
BibliographyConsistencyCheckResultGitHubActionsWriterTest.javaUpdate assertions for self-describing GitHub Actions messages +4/-2

Update assertions for self-describing GitHub Actions messages

• Adjusts tests to assert that emitted messages now include citation key and field name (including distinct cases for multiple entries). Retains the existing checks ensuring the title property does not contain unencoded ':' separators.

jablib/src/test/java/org/jabref/logic/quality/consistency/BibliographyConsistencyCheckResultGitHubActionsWriterTest.java

@qodo-free-for-open-source-projects

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Qodo Logo

@koppor koppor added component: jabkit status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers labels Jun 23, 2026
@Siedlerchr
Siedlerchr added this pull request to the merge queue Jun 29, 2026
@github-actions github-actions Bot added the status: to-be-merged PRs which are accepted and should go into the merge-queue. label Jun 29, 2026
Merged via the queue into main with commit b1c0aca Jun 29, 2026
103 of 111 checks passed
@Siedlerchr
Siedlerchr deleted the jabkit-github-actions-message branch June 29, 2026 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: jabkit status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers status: to-be-merged PRs which are accepted and should go into the merge-queue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants