octokit / octokit/openapi

Stale override replaces `discussions` with `team_discussions` in app-permissions

Open Beginner friendly
#528 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
56
Forks
12
Avg merge
8d 15h
Merged PRs (30d)
1

Description

Problem

The override files for /app/installations (scripts/overrides/get-app-installations.json and .deref.json) contain a stale copy of the app-permissions schema that uses team_discussions instead of discussions.

The upstream source (github/rest-api-description) correctly has discussions in its app-permissions schema, but replaceOperation() in scripts/overrides/index.mjs overwrites it with the stale override copy.

Impact

Consumers of @octokit/openapi (e.g. actions/create-github-app-token) that auto-generate permission inputs from app-permissions end up with team_discussions instead of discussions, causing:

  • Missing permission-discussions input (users get "Unexpected input" warnings)
  • Incorrect permission-team-discussions present instead

Root Cause

The override files were created to fix a anyOf issue (see #305 on openapi-types.ts) but contain a frozen snapshot of the permissions schema from that time. As the upstream schema evolved (team_discussionsdiscussions), the overrides were never updated.

Fix

Update the two override files to replace team_discussions with discussions (matching the current upstream schema). Also update any other stale permissions that may have drifted.

PR incoming.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with scripts/overrides/get-app-installations.json and scripts/overrides/get-app-installations.deref.json, then read replaceOperation() in scripts/overrides/index.mjs and compare the app-permissions schema with the upstream source. Update the stale permission names and check for other permissions that have drifted; done means the overrides match the current upstream schema, including discussions.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, openapi
Domain
api, tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.