Skip to content

[q] feat(api-consumption-report): render charts as inline markdown images #25927

@github-actions

Description

@github-actions

Closes discussion #25924 (triggered by @pelikhan's /q render the artifacts as images (markdown) request).

What Changed

The api-consumption-report workflow previously uploaded chart PNGs as GitHub Actions artifacts (upload_artifact), then referenced them in discussions with plain text links like:

📎 **[Chart: GitHub API Calls Trend](...)** — artifact `aw_abc12345`

Artifact download URLs require authentication and cannot be embedded as inline images in GitHub markdown.

Now: upload_asset → inline ![alt](url)

The workflow now uses upload_asset, which pushes files to an orphaned git branch (assets/api-consumption-report) and returns a permanent public raw URL. Charts are embedded directly in the discussion body using standard markdown image syntax:

![GitHub API Calls Trend — daily REST API calls with 7-day rolling average](https://github.com/.../blob/assets/api-consumption-report/...?raw=true)

Files Modified

  • .github/workflows/api-consumption-report.md
    • safe-outputs: replaced upload-artifact config with upload-asset:
    • Step 5: simplified — call upload_asset(path=...) directly (no staging needed), collect returned URL per chart
    • Step 6 template: 5 chart sections updated from 📎 text link![alt](url) image syntax

Validation

api-consumption-report compiled successfully (no errors or warnings)


Warning

Protected Files — Push Permission Denied

This was originally intended as a pull request, but the patch modifies protected files. A human must create the pull request manually.

Protected files

The push was rejected because GitHub Actions does not have workflows permission to push these changes, and is never allowed to make such changes, or other authorization being used does not have this permission.

Create the pull request manually
# Download the patch from the workflow run
gh run download 24313622522 -n agent -D /tmp/agent-24313622522

# Create a new branch
git checkout -b q/render-artifacts-as-images-1f342ad9465b3864 main

# Apply the patch (--3way handles cross-repo patches)
git am --3way /tmp/agent-24313622522/aw-q-render-artifacts-as-images.patch

# Push the branch and create the pull request
git push origin q/render-artifacts-as-images-1f342ad9465b3864
gh pr create --title '[q] feat(api-consumption-report): render charts as inline markdown images' --base main --head q/render-artifacts-as-images-1f342ad9465b3864 --repo github/gh-aw

🎩 Equipped by Q · ● 3.2M ·

  • expires on Apr 14, 2026, 6:48 PM UTC

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions