Skip to content

Add structured JSON output to empty-repo workflow #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Jul 22, 2025

This update enhances the existing GitHub Actions workflow by exposing the scan results as structured JSON output. Key improvements:

  • Added id: report to the GitHub Script step, enabling reference to its outputs.
  • After creating the human-readable issue, serialise the report data (org, visibility, date, empty and readmeOnly arrays) into JSON.
  • Emit the JSON via the ::set-output name=report-json:: command, allowing downstream steps or external systems to consume and POST the structured data.

Fixes #8.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

🚧 Copilot coding agent is using an experimental model for this task. Please take the time to report feedback with the 👍 or 👎 buttons.

Co-authored-by: ashleywolf <10735907+ashleywolf@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Add a structured output format Add structured JSON output to empty-repo workflow Jul 22, 2025
@Copilot Copilot AI requested a review from ashleywolf July 22, 2025 05:35
Copilot finished work on behalf of ashleywolf July 22, 2025 05:35
@ashleywolf ashleywolf marked this pull request as ready for review July 23, 2025 01:23
@Copilot Copilot AI review requested due to automatic review settings July 23, 2025 01:24
Copy link

@Copilot 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 enhances the GitHub Actions workflow to expose scan results as structured JSON output for programmatic consumption. The changes enable downstream steps or external systems to access the repository health data in a machine-readable format.

  • Added step ID to enable output referencing
  • Implemented JSON serialization of scan results including organization, visibility, date, and repository arrays
  • Added GitHub Actions output command to expose the JSON data

@@ -93,3 +94,5 @@ jobs:
title: `Monthly Repo Health: ${org} (${today})`,
body
});
const jsonReport = JSON.stringify({ org, visibility, date: today, empty, readmeOnly });
console.log(`::set-output name=report-json::${jsonReport}`);
Copy link
Preview

Copilot AI Jul 23, 2025

Choose a reason for hiding this comment

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

The ::set-output command is deprecated in GitHub Actions. Use core.setOutput('report-json', jsonReport) instead, which requires adding const core = require('@actions/core'); at the beginning of the script.

Copilot uses AI. Check for mistakes.

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.

Add a structured output format
2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy