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

feat: new /orgs/{org}/properties/schema/{custom_property_name, GET /orgs/{org}/properties/schema, GET /orgs/{org}/properties/values, GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}, GET /orgs/{org}/rulesets/rule-suites, GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}, POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel endpoints #590

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

octokitbot
Copy link
Collaborator

Make sure to update the commits so that the merge results in helpful release notes, see Merging the Pull Request & releasing a new version.

In general

  • Avoid breaking changes at all costs
  • If there are no typescript or code changes, use a docs prefix
  • If there are typescript changes but no code changes, use fix(typescript) prefix
  • If there are code changes, use fix if a problem was resolved, feat if new endpoints / parameters were added, and feat(deprecation) if a method was deprecated.

@octokitbot octokitbot added Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR typescript Relevant to TypeScript users only labels Oct 24, 2023
@github-actions
Copy link
Contributor

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@wolfy1339
Copy link
Member

@kfcampbell You forgot to update the generated files like in this PR

@kfcampbell
Copy link
Member

🤦 That's done by scripts/update-endpoints?

@wolfy1339 wolfy1339 changed the title 🚧 GitHub OpenAPI spec changed feat: new /orgs/{org}/properties/schema/{custom_property_name, GET /orgs/{org}/properties/schema, GET /orgs/{org}/properties/values, GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}, GET /orgs/{org}/rulesets/rule-suites, GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}, POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel endpoints Oct 24, 2023
@wolfy1339
Copy link
Member

yeah

@wolfy1339 wolfy1339 merged commit decdf84 into main Oct 24, 2023
7 checks passed
@wolfy1339 wolfy1339 deleted the openapi-update branch October 24, 2023 21:18
@octokitbot
Copy link
Collaborator Author

🎉 This PR is included in version 12.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@OMartinez-NeT
Copy link

OMartinez-NeT commented Oct 30, 2023

Hey @kfcampbell thanks for this contribution!! I have a question why when I try to use one of the types of this PR example:

type GitHubCustomProperty =
  Endpoints["GET /orgs/{org}/properties/schema/{custom_property_name}"];

The result type has the property response as type unkwown:

type GitHubCustomProperty = {
    parameters: {};
    request: {
        method: "GET";
        url: "/orgs/{org}/properties/schema/{custom_property_name}";
        headers: RequestHeaders;
        request: RequestRequestOptions;
    };
    response: unknown;
}

Whereas if I use another type example:

type listUserReposResponse = Endpoints["GET /repos/{owner}/{repo}"];

The result type has response populated:

type listUserReposResponse = {
    parameters: {
        owner: string;
        repo: string;
    };
    request: {
        method: "GET";
        url: "/repos/{owner}/{repo}";
        headers: RequestHeaders;
        request: RequestRequestOptions;
    };
    response: OctokitResponse<...>;
}

Is the unknown type in the first example expected? Thanks!

@gr2m
Copy link
Contributor

gr2m commented Oct 30, 2023

Can you share your tsconfig settings? I think you need to enable the strict mode

@OMartinez-NeT
Copy link

OMartinez-NeT commented Oct 30, 2023

Can you share your tsconfig settings? I think you need to enable the strict mode

Yes for sure:

{
  "compilerOptions": {
    "module": "commonjs",
    "moduleResolution": "node",
    "strict": true, 
    "noImplicitReturns": true, 
    "skipLibCheck": true, 
    "noFallthroughCasesInSwitch": true,
    "preserveConstEnums": true, 
    "noUnusedLocals": true, 
    "sourceMap": true,
    "inlineSources": true,
    "useUnknownInCatchVariables": false,
    "assumeChangesOnlyAffectDirectDependencies": true,
    "target": "es2022",
    "incremental": true,
    "lib": ["es2022"],
    "baseUrl": "build",
    "noErrorTruncation": false, 
    "esModuleInterop": true,
    "experimentalDecorators": true, 
    "emitDecoratorMetadata": true, 
    "pretty": true,
    "preserveWatchOutput": true,
    "resolveJsonModule": true
  }
}

@gr2m
Copy link
Contributor

gr2m commented Oct 30, 2023

I cannot reproduce the problem, see my TypeScript playground

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR typescript Relevant to TypeScript users only
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants