Skip to content
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

[Schema Inaccuracy] issue.state_reason missing enum variant: duplicate #4492

Open
sterliakov opened this issue Feb 3, 2025 · 0 comments
Open
Labels

Comments

@sterliakov
Copy link

sterliakov commented Feb 3, 2025

Schema Inaccuracy

(this issue was reposted from https://github.com/orgs/community/discussions/150535, cc yanyongyu/githubkit#188)

Current definition:

      "state_reason": {
        "description": "The reason for the current state",
        "type": [
          "string",
          "null"
        ],
        "enum": [
          "completed",
          "reopened",
          "not_planned",
          null
        ],
        "examples": [
          "not_planned"
        ]
      },

Expected

duplicate listed among variants. Here's an issue with that state_reason (https://api.github.com/repos/python/mypy/issues/18584):

    {
        "active_lock_reason": null,
        "assignee": null,
        "assignees": [],
        "author_association": "CONTRIBUTOR",
        "body": "...",                                                                                                     
        "closed_at": "2025-02-02T16:24:49Z",
        "closed_by": {...},
        "comments": 1,
        "comments_url": "https://api.github.com/repos/python/mypy/issues/18584/comments",
        "created_at": "2025-02-01T23:28:55Z",
        "events_url": "https://api.github.com/repos/python/mypy/issues/18584/events",
        "html_url": "https://github.com/python/mypy/issues/18584",
        "id": 2825499430,
        "labels": [...],
        "labels_url": "https://api.github.com/repos/python/mypy/issues/18584/labels{/name}",
        "locked": false,
        "milestone": null,
        "node_id": "I_kwDOAGuhRc6oabMm",
        "number": 18584,
        "performed_via_github_app": null,
        "reactions": {...},
        "repository_url": "https://api.github.com/repos/python/mypy",
        "state": "closed",
        "state_reason": "duplicate",
        "sub_issues_summary": {
            "completed": 0,
            "percent_completed": 0,
            "total": 0
        },
        "timeline_url": "https://api.github.com/repos/python/mypy/issues/18584/timeline",
        "title": "Overloaded signature with `LiteralString` is seen as \"broader or same\" as `str`",
        "updated_at": "2025-02-02T16:24:50Z",
        "url": "https://api.github.com/repos/python/mypy/issues/18584",
        "user": {...}
    }

Reproduction Steps

$ curl -fs https://api.github.com/repos/python/mypy/issues/18584 | jq -r '.state_reason'
duplicate
@becco becco added the feature label Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants