Skip to content

chore: make section_id input optional in changelog notify workflow#48

Merged
Valentin-Shyaka merged 1 commit into
mainfrom
make-section-id-optional
Jun 24, 2026
Merged

chore: make section_id input optional in changelog notify workflow#48
Valentin-Shyaka merged 1 commit into
mainfrom
make-section-id-optional

Conversation

@Valentin-Shyaka

Copy link
Copy Markdown
Contributor

No description provided.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Jun 24, 2026

Copy link
Copy Markdown

Greptile Summary

This PR makes the section_id workflow dispatch input optional so callers can trigger a changelog notification without linking it to a specific docs section.

  • The YAML change is a one-liner: required: truerequired: false on the section_id input.
  • The companion script notify-backend.js is unchanged, so when section_id is omitted GitHub Actions will pass an empty string \"\" as SECTION_ID, which gets serialised as \"sectionID\": \"\" in the API payload rather than being absent — the backend may not handle that gracefully.

Confidence Score: 4/5

Safe to merge if the backend already handles an absent or empty sectionID field; needs verification before merging if that behaviour is unknown.

The workflow change itself is minimal and correct, but the script that consumes the input was not updated alongside it. When a user skips section_id, the API receives "sectionID": "" rather than the field being omitted, which could cause the notification job to fail or behave incorrectly on every optional-section run.

.github/scripts/notify-backend.js — needs a guard so an empty section_id is not forwarded to the API.

Important Files Changed

Filename Overview
.github/workflows/changelog-notify.yml Single-line change making section_id input optional; downstream script does not guard against the empty string this produces.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    actor User
    participant GHA as GitHub Actions
    participant Script as notify-backend.js
    participant API as changelog-api

    User->>GHA: workflow_dispatch (section_id omitted)
    GHA->>Script: "SECTION_ID="" (empty string)"
    Script->>API: "POST /api/changelog { sectionID: "" }"
    alt backend rejects empty string
        API-->>Script: 4xx error
        Script-->>GHA: exit(1) — workflow fails
    else backend accepts empty string
        API-->>Script: 2xx OK
    end
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    actor User
    participant GHA as GitHub Actions
    participant Script as notify-backend.js
    participant API as changelog-api

    User->>GHA: workflow_dispatch (section_id omitted)
    GHA->>Script: "SECTION_ID="" (empty string)"
    Script->>API: "POST /api/changelog { sectionID: "" }"
    alt backend rejects empty string
        API-->>Script: 4xx error
        Script-->>GHA: exit(1) — workflow fails
    else backend accepts empty string
        API-->>Script: 2xx OK
    end
Loading

Reviews (1): Last reviewed commit: "chore: make section_id input optional in..." | Re-trigger Greptile

@Valentin-Shyaka Valentin-Shyaka merged commit c8b4c4d into main Jun 24, 2026
5 checks passed
@mintlify

mintlify Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
strettch-cloud 🟢 Ready View Preview Jun 24, 2026, 1:59 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

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.

1 participant