Skip to content
This repository was archived by the owner on Sep 4, 2025. It is now read-only.

Conversation

@aditigopalan
Copy link
Contributor

@aditigopalan aditigopalan commented Apr 22, 2025

Description

This PR fixes an issue in the JSON-LD conversion workflow where the action was failing with the error "Cannot read properties of undefined (reading 'ref')" when triggered manually or by a release event.

Changes

  • Added a PR context check to conditionally run PR-related steps
  • The workflow now only attempts to fetch and push PR changes when triggered by a pull request
  • Manual triggers and release events will skip the PR-related steps while still performing the JSON-LD conversion

Testing

  • Successfully tested the workflow with a manual trigger on this branch
  • The JSON-LD conversion completes without errors
  • PR-related steps are properly skipped when not in a PR context

Fixes #509

@aditigopalan aditigopalan requested a review from Copilot April 22, 2025 14:02
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes an error in the JSON-LD conversion workflow by adding a PR context check so that PR-specific steps are only executed when applicable.

  • Introduces a condition to set and check the PR context.
  • Conditionally executes the pr-fetch and pr-push steps.
  • Prevents the workflow from attempting PR operations during manual or release events.
Comments suppressed due to low confidence (2)

.github/workflows/ci-lint-validate-convert.yml:89

  • [nitpick] Consider renaming the step id 'check_pr' to a more descriptive identifier such as 'pr_context_check' to improve readability.
- name: Check if in PR context

.github/workflows/ci-lint-validate-convert.yml:109

  • [nitpick] Ensure consistency in naming by using the same descriptive identifier for conditional steps across the workflow.
- name: Push changes

@aditigopalan aditigopalan merged commit ca776e9 into main Apr 22, 2025
4 checks passed
@aditigopalan aditigopalan deleted the fix-jsonld-action branch April 22, 2025 14:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Action ci-lint-validate.yml Failing: Investigate GitHub Token expiry or Action error

2 participants