GithubHelp home page GithubHelp logo

octokit / plugin-rest-endpoint-methods.js Goto Github PK

View Code? Open in Web Editor NEW
101.0 14.0 53.0 10.86 MB

Octokit plugin adding one method for all of api.github.com REST API endpoints

License: MIT License

JavaScript 1.42% TypeScript 98.58%
octokit-js plugin rest-api hacktoberfest

plugin-rest-endpoint-methods.js's Introduction

plugin-rest-endpoint-methods.js

Octokit plugin adding one method for all of api.github.com REST API endpoints

@latest Build Status

Usage

Browsers

Load @octokit/plugin-rest-endpoint-methods and @octokit/core (or core-compatible module) directly from esm.sh

<script type="module">
  import { Octokit } from "https://esm.sh/@octokit/core";
  import { restEndpointMethods } from "https://esm.sh/@octokit/plugin-rest-endpoint-methods";
</script>
Node

Install with npm install @octokit/core @octokit/plugin-rest-endpoint-methods. Optionally replace @octokit/core with a compatible module

import { Octokit } from "@octokit/core";
import { restEndpointMethods } from "@octokit/plugin-rest-endpoint-methods";
const MyOctokit = Octokit.plugin(restEndpointMethods);
const octokit = new MyOctokit({ auth: "secret123" });

// https://developer.github.com/v3/users/#get-the-authenticated-user
octokit.rest.users.getAuthenticated();

There is one method for each REST API endpoint documented at https://developer.github.com/v3. All endpoint methods are documented in the docs/ folder, e.g. docs/users/getAuthenticated.md

TypeScript

Parameter and response types for all endpoint methods exported as { RestEndpointMethodTypes }.

Example

import { RestEndpointMethodTypes } from "@octokit/plugin-rest-endpoint-methods";

type UpdateLabelParameters =
  RestEndpointMethodTypes["issues"]["updateLabel"]["parameters"];
type UpdateLabelResponse =
  RestEndpointMethodTypes["issues"]["updateLabel"]["response"];

In order to get types beyond parameters and responses, check out @octokit/openapi-types, which is a direct transpilation from GitHub's official OpenAPI specification.

Contributing

See CONTRIBUTING.md

License

MIT

plugin-rest-endpoint-methods.js's People

Contributors

copperwall avatar dependabot[bot] avatar eladchen avatar fetsorn avatar github-actions[bot] avatar gr2m avatar greenkeeper[bot] avatar iamhughes avatar jaredegolf avatar jhutchings1 avatar johanneswuerbach avatar jsoref avatar jumplink avatar kevinoid avatar kfcampbell avatar nickfloyd avatar octokitbot avatar oscard0m avatar renovate[bot] avatar srawlins avatar timrogers avatar wolfy1339 avatar zaubernerd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

plugin-rest-endpoint-methods.js's Issues

[BUG]: Upgrading from `@actions/github` V5 -> V6 caused TypeErrors within `getOcktokit()`

What happened?

Version 5 of @actions/github, I was able to do this within my tests:

import { getOctokit } from '@actions/github'
import type { Endpoints } from '@octokit/types'
import sinon from 'sinon'

const octokit = getOctokit('token')

const stubLabelList = () => {
	return sinon.stub(octokit.rest.issues, 'listLabelsForRepo').resolves({
		data: [MOCK_LIST_LABELS],
		status: 200
		} as Endpoints["GET /repos/{owner}/{repo}/labels"]["response"])
	}
}

const github = {
	getOctokit: () => octokit
}

// pass github  and stubLabelList to other test functions etc 

As of version 6, I've had to do something like:

import { getOctokit } from '@actions/github'
import type { Endpoints } from '@octokit/types'
import sinon from 'sinon'

const octokit = getOctokit('token')

const github = {
	getOctokit: () => {
		...octokit, 
		rest: { 
			issues: {
				listLabelsForRepo: () => {
					return {
						data: [MOCK_LIST_LABELS],
						status: 200
					} as Endpoints["GET /repos/{owner}/{repo}/labels"]["response"])
				}
			}
		} 
	}
}

I noticed this was a change in way the endpoints are generated and is now done via a proxy as of #622, could this of introduced unwanted side effects or is this the intended behaviour?

Versions

@actions/github: v6
NodeJS: 18

Relevant log output

TypeError: Cannot destructure property ‘decorations’ of ‘endpointMethodsMap.get(...).get(...)’ as it is undefined.

Code of Conduct

  • I agree to follow this project's Code of Conduct

An in-range update of @types/node is breaking the build 🚨

The devDependency @types/node was updated from 13.7.0 to 13.7.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@types/node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • test (12): There are 1 failures, 0 warnings, and 0 notices.
  • test (10): There are 2 failures, 0 warnings, and 0 notices.

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

The automated release is failing 🚨

🚨 The automated release from the 2.x branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this 💪.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the 2.x branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


The release 3.0.0 on branch 2.x cannot be published as it is out of range.

Based on the releases published on other branches, only versions within the range >=2.4.0 <3.0.0 can be published from branch 2.x.

The following commits are responsible for the invalid release:

  • build: resolve merge conflicts from master (6e79bf6)
  • docs: description updates (#30) (09bc0de)
  • test: method without any parameters (99b0819)
  • feat: octokit.actions.listDownloadsForSelfHostedRunnerApplication({ owner, repo }) (8f25a16)
  • build: endpoints updated (2e345cd)
  • docs(README): octokit.actions.listDownloadsForSelfHostedRunnerApplication({ owner, repo }) (813f0a8)
  • ci: debug release workflow (f029625)
  • build(package): lock file (74322a6)
  • chore(package): update @pika/plugin-ts-standard-pkg to version 0.8.1 (49242bc)
  • chore(package): update @pika/plugin-build-web to version 0.8.1 (0da697c)
  • chore(package): update @pika/plugin-build-node to version 0.8.1 (ff80617)
  • test: rename (96749b9)
  • fix: map contexts/users/teams etc parameters to data for branch protection endpoints (d48f560)
  • test: octokit.repos.addProtectedBranchRequiredStatusChecksContexts() (12e92c2)
  • build: mapToData parameter decoriation (23811aa)
  • refactor(types): order change (0b9a480)
  • docs(README): remove merge conflict (257a3f9)
  • build(update-endpoints): cache update for v27.1.0 (81b336d)
  • build: remove console.log (04a0fd4)
  • test: remove obsolete test for deprecated endpoint methods (3774640)
  • test: stop testing in Node 8 (b18cfb2)
  • remainging deprecated endpoint methods removed (aacdecf)
  • build(update-endpoints): cache update (a340951)
  • build(update-endpoints): ignore deprecated endpoint methods (8489b1c)
  • docs(README): remainging deprecated endpoint methods removed (26dd8f1)
  • legacy endpoint methods removed (4f6941e)
  • build(update-endpoints): cache updated (af286e1)
  • build(update-endpoints): ignore legacy endpoints (9cc6811)
  • docs(README): legacy endpoint methods removed (92c8917)
  • refactor: comment out code for deprecations (until we have them again) (591a4c3)
  • test: remove obsolete deprecations tests (6f85e31)
  • remove all deprecated methods and parameters (5417f3d)
  • docs(README): remove all deprecated methods (85a517f)
  • build(update-endpoints): cache update (5ff6b9c)
  • build(update-endpoints): ignore all changes before 2020-02-01 (7e2e951)
  • build(update-endpoints): add octokit.repos.uploadReleaseAsset() workarounds for types generation (d66ddfb)
  • build(update-endpoints): cache updated (7982cb4)
  • build(update-endpoints): fetch headers.required (ecb79ea)
  • build(update-endpoints): handle special case for octokit.repos.uploadReleaseAsset (4abd16e)
  • build: correct defaults and types for octokit.repos.uploadReleaseAsset() (6eb4063)
  • test: octokit.repos.uploadReleaseAsset with owner, repo and release_id options (d3bd732)
  • build(package): lock file (94f78c1)
  • build(package): just v25 (7701bee)
  • fix(typescript): remove types for obsolete workarounds (c228877)
  • build(update-endpoints): remove workarounds from types generation (58a411d)
  • feat(typescript): Actions endpoints (7114403)
  • build(update-endpoints): cache updated (6fa3fb8)
  • build: automatically generated src/generated/types.ts (262bc54)
  • style: prettier (80f1ec0)
  • build: temporary generate endpoints.json for octokit/routes v26.18.1 as that was the version the last generated/types.ts was built with / copied from (92f003b)
  • refactor: src/generated/rest-endpoint-methods-types.ts -> src/generated/types.ts (fe00904)
  • remove .registerEndpoints (51a85da)
  • build: generate octokit.repos.uploadReleaseAsset endpoint method (7177356)
  • build: octokit.issues.updateLabel({ current_name, name}) is now octokit.issues.updateLabel({ name, new_name}) (834d570)
  • build: remove obsolete methods (f2e6c6e)
  • docs: remove obsolete octokit.pulls.createFromIssue, octokit.git.listRefs, octokit.repos.getCommitRefSha (b7641eb)
  • build(update-endpoints): cache updated (7f0530c)
  • build: remove workarounds (72a6f31)

Those commits should be moved to a valid branch with git merge or git cherry-pick and removed from branch 2.x with git revert or git reset.

A valid branch could be master.

See the workflow configuration documentation for more details.


Good luck with your project ✨

Your semantic-release bot 📦🚀

Enum types in responses are being generically typed as string

What happened?

There are enum types are being specified as string when they are really string enums.

What did you expect to happen?

That these enum types are specified as string enums. For example:

enum CheckRunStatus {
  queued = 'queued',
  in_progress = 'in_progress',
  completed = 'completed'
}
export enum CheckSuiteConclusion {
  action_required = 'action_required',
  cancelled = 'cancelled',
  timed_out = 'timed_out',
  failure = 'failure',
  neutral = 'neutral',
  success = 'success'
}
...
type ChecksListSuitesForRefResponseCheckSuitesItem = {
  ...
  conclusion: CheckSuiteConclusion;
  status: CheckRunStatus
};

vs.

type ChecksListSuitesForRefResponseCheckSuitesItem = {
  ...
  conclusion: string;
  status: string
};

What the problem might be

How this repo generates its types.

export various unexposed types

What’s missing?

many types, such as SearchCommitsResponse are not exposed. alternatively, perhapes we consider enhanced type inference on .paginate(...) to infer expected output types from inputs

Why?

consider the following:

const res = await octokit.paginate(searchCommitOptions) // PaginationResults<unknown>

it would be great have better typing here. it is constrained because it expects a generic--<T>(options: OctokitTypes.EndpointOptions): Promise<PaginationResults<T>>;--and i cannot pass SearchCommitsResponse in, because it's not exported.

Alternatives you tried

n/a

[BUG]: createOrUpdateFileContents results in error 504

What happened?

Using the createOrUpdateFileContents in a the pull-request-artifacts action is failing to upload, and returning a 504 error, and the message "Error: We couldn't respond to your request in time. Sorry about that. Please try resubmitting your request and contact us if the problem persists."

Versions

plugin-rest-endpoint-methods 10.1.2

Relevant log output

Run gavv/[email protected]
Artifacts repo: meshtastic/artifacts
Artifacts branch: device
Artifacts prefix: "pr2739-"
Processing artifact: ./firmware-2.2.16.d952da8.zip
GET /repos/meshtastic/artifacts/contents/.?ref=device - 200 in 264ms
Uploading file pr2739-firmware-2.2.16.d952da8.zip (first time)
PUT /repos/meshtastic/artifacts/contents/pr2739-firmware-2.2.16.d952da8.zip - 504 in 11150ms
Error: We couldn't respond to your request in time. Sorry about that. Please try resubmitting your request and contact us if the problem persists.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Replace "cdn.pika.dev" with "cdn.skypack.dev" in README

🆕🐥☝ First Timers Only.

This issue is reserved for people who never contributed to Open Source before. We know that the process of creating a pull request is the biggest barrier for new contributors. This issue is for you 💝

About First Timers Only.

🤔 What you will need to know.

The Pika CDN is now Skypack, see https://www.pika.dev/cdn. The CDN at https://cdn.pika.dev/ no longer works, all URLs must be replaced with the new CDN: https://cdn.skypack.dev/. We currently recommend using cdn.pika.dev to import the library into the browser, but that no longer works. Replacing it with cdn.skypack.dev will make it work again.

📋 Step by Step

  • 🙋 Claim this issue: Comment below.

    More than one person can work on this issue, don't worry if it's already claimed.

  • 📝 Update the file \README.md (press the little pen Icon) and edit as shown below:

@@ -13,12 +13,12 @@
 Browsers
 </th><td width=100%>
 
-Load `@octokit/plugin-rest-endpoint-methods` and [`@octokit/core`](https://github.com/octokit/core.js) (or core-compatible module) directly from [cdn.pika.dev](https://cdn.pika.dev)
+Load `@octokit/plugin-rest-endpoint-methods` and [`@octokit/core`](https://github.com/octokit/core.js) (or core-compatible module) directly from [cdn.skypack.dev](https://cdn.skypack.dev)
 
 ```html
 <script type="module">
-  import { Octokit } from "https://cdn.pika.dev/@octokit/core";
-  import { restEndpointMethods } from "https://cdn.pika.dev/@octokit/plugin-rest-endpoint-methods";
+  import { Octokit } from "https://cdn.skypack.dev/@octokit/core";
+  import { restEndpointMethods } from "https://cdn.skypack.dev/@octokit/plugin-rest-endpoint-methods";
 </script>
 ```
 
  • 💾 Commit your changes

  • 🔀 Start a Pull Request. There are two ways how you can start a pull request:

    1. If you are familiar with the terminal or would like to learn it, here is a great tutorial on how to send a pull request using the terminal.
    2. You can edit files directly in your browser
  • 🏁 Done Ask for a review :)

If there are more than one pull requests with the correct change, we will merge the first one, but attribute the change to all authors who made the same change using @Co-authored-by, so yo can be sure your contribution will count.

🤔❓ Questions

Leave a comment below!

This issue was created by First-Timers-Bot.

Incorrect type for setLabels

What happened?

The type inferred for setLabels is incorrect. It is constrained to:

string[] & {
  name: string
}[]

What did you expect to happen?

It should be:

string[] | {
  name: string
}[]

As the API documentation specifies that you can pass either an array of strings, or an array of objects that have names (as opposed to an array which satisfies both).

What the problem might be

The definition appears to be:

"issues/set-labels": {
    parameters: {
      path: {
        owner: components["parameters"]["owner"];
        repo: components["parameters"]["repo"];
        /** issue_number parameter */
        issue_number: components["parameters"]["issue_number"];
      };
    };
    responses: {
      /** Response */
      200: {
        content: {
          "application/json": components["schemas"]["label"][];
        };
      };
      410: components["responses"]["gone"];
      422: components["responses"]["validation_failed"];
    };
    requestBody: {
      content: {
        "application/json": Partial<{
          /** The names of the labels to add to the issue. You can pass an empty array to remove all labels. **Note:** Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. */
          labels?: string[];
        }> &
          Partial<{
            labels?: {
              name: string;
            }[];
          }>;
      };
    };
  };

Gist update is not working as expect

Checklist

Environment

  • https://api.github.com
  • GitHub Enterprise Server:
  • GitHub Enterprise Cloud
  • Node.js
  • Browsers: chrome Version 80.0.3987.149 (Official Build) (64-bit)
  • Others:

Versions

├─┬ @octokit/[email protected]
│ ├─┬ @octokit/[email protected]
│ │ ├─┬ @octokit/[email protected]
│ │ ├─┬ @octokit/[email protected]
│ │ ├─┬ @octokit/[email protected]
│ │ │ ├─┬ @octokit/[email protected]
│ │ │ ├─┬ @octokit/[email protected]
│ │ ├─┬ @octokit/[email protected]
│ ├─┬ @octokit/[email protected]
│ ├── @octokit/[email protected]
│ └─┬ @octokit/[email protected]

What happened?

The following code is not working.

async function start() {
  const git = new Octokit({
    auth: 'xxx'
  })
  await git.gists.update({
    gist_id: id,
    files: {
      content: 'update from api',
      filename: 'postcss.config.js'
    }
  })
}

start()

image

Minimal test case to reproduce the problem

import { Octokit } from '@octokit/rest'
async function start() {
  const git = new Octokit({
    auth: 'xxx'
  })
  await git.gists.update({
    gist_id: id,
    files: {
      content: 'update from api',
      filename: 'postcss.config.js'
    }
  })
}

start()

What did you expect to happen?

Working correctly.

What the problem might be

Wrong type define and document.

The official document is: https://developer.github.com/v3/gists/#update-a-gist

And the type define should be:

type GistsUpdateEndpoint = {
  /**
   * gist_id parameter
   */
  gist_id: string;
  /**
   * A descriptive name for this gist.
   */
  description?: string;
  /**
   * The filenames and content that make up this gist.
   */
  files?: {
    [filename:string]: GistsUpdateParamsFiles
  };
};

npm version 2.4.0

What happened?

Couldn't find any versions for "@octokit/plugin-rest-endpoint-methods" that matches "2.4.0"

What did you expect to happen?
To install it with no errors

What the problem might be
My findings so far are that yesterday this issue didn’t happen, then earlier today (6 hours ago) you released this version @octokit/[email protected], which got me thinking maybe it’s (flushing, npm publish, idk), so I checked at npm WEBSITE and it did release properly and the latest tag is on 2.4.0

Afterwards I ran npm view @octokit/plugin-rest-endpoint-methods versions and that’s where all the fun begins, the response doesn’t contain version 2.4.0

Thanks in advance :)

Generated response types are incorrect for some values

What happened?

Current entry in @octokit/plugin-rest-endpoint-methods/dist-types/generated/types.d.ts:

declare type SearchIssuesAndPullRequestsResponseItemsItem = {
    assignee: null;
    body: string;
    closed_at: null;
    comments: number;
    comments_url: string;
    created_at: string;
    events_url: string;
    html_url: string;
    id: number;
    labels: Array<SearchIssuesAndPullRequestsResponseItemsItemLabelsItem>;
    labels_url: string;
    milestone: null;
    node_id: string;
    number: number;
    pull_request: SearchIssuesAndPullRequestsResponseItemsItemPullRequest;
    repository_url: string;
    score: number;
    state: string;
    title: string;
    updated_at: string;
    url: string;
    user: SearchIssuesAndPullRequestsResponseItemsItemUser;
};

What did you expect to happen?

I'd expect closed_at to be string | null. I'm unsure about the other null types as well.

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: package.json
Error type: The renovate configuration file contains some invalid settings
Message: Invalid configuration option: @pika/pack, Invalid configuration option: author, Invalid configuration option: jest, Invalid configuration option: keywords, Invalid configuration option: license, Invalid configuration option: name, Invalid configuration option: packageRules[0].@octokit/types, Invalid configuration option: packageRules[0].deprecation, Invalid configuration option: packageRules[1].@gimenete/type-writer, Invalid configuration option: packageRules[1].@octokit/core, Invalid configuration option: packageRules[1].@octokit/graphql, Invalid configuration option: packageRules[1].@pika/pack, Invalid configuration option: packageRules[1].@pika/plugin-build-node, Invalid configuration option: packageRules[1].@pika/plugin-build-web, Invalid configuration option: packageRules[1].@pika/plugin-ts-standard-pkg, Invalid configuration option: packageRules[1].@types/fetch-mock, Invalid configuration option: packageRules[1].@types/jest, Invalid configuration option: packageRules[1].@types/node, Invalid configuration option: packageRules[1].fetch-mock, Invalid configuration option: packageRules[1].fs-extra, Invalid configuration option: packageRules[1].jest, Invalid configuration option: packageRules[1].lodash.camelcase, Invalid configuration option: packageRules[1].lodash.set, Invalid configuration option: packageRules[1].lodash.upperfirst, Invalid configuration option: packageRules[1].mustache, Invalid configuration option: packageRules[1].npm-run-all, Invalid configuration option: packageRules[1].prettier, Invalid configuration option: packageRules[1].semantic-release, Invalid configuration option: packageRules[1].semantic-release-plugin-update-version-in-files, Invalid configuration option: packageRules[1].sort-keys, Invalid configuration option: packageRules[1].string-to-jsdoc-comment, Invalid configuration option: packageRules[1].ts-jest, Invalid configuration option: packageRules[1].typescript, Invalid configuration option: packageRules[2].@octokit/core, Invalid configuration option: publishConfig, Invalid configuration option: release, Invalid configuration option: renovate, Invalid configuration option: scripts, Invalid configuration option: version

[BUG]: Peer dependency of @octokit/core@">=5" broken as @octokit/core@6 is ESM

What happened?

Now that octokitcore@6 has moved to ESM the peer dependency usage results in problems when attempting to load the module. This is affecting versions of this plugin before it moved to ESM

Versions

Octokit/[email protected], Node 18.19.0

Relevant log output

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in ...../node_modules/@octokit/core/package.json
    at new NodeError (node:internal/errors:405:5)
    at exportsNotFound (node:internal/modules/esm/resolve:366:10)
    at packageExportsResolve (node:internal/modules/esm/resolve:656:13)
    at resolveExports (node:internal/modules/cjs/loader:584:36)

Code of Conduct

  • I agree to follow this project's Code of Conduct

build is failing on latest release

What happened?

it appears that the latest patch has changed some type information which is causing build process to fail. Error seems to be similar to the ones in #172

$ tsc
Error: node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts(257,60): error TS2339: Property 'POST /repos/{owner}/{repo}/actions/runs/{run_id}/retry' does not exist on type 'Endpoints'.
Error: node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts(258,33): error TS2339: Property 'POST /repos/{owner}/{repo}/actions/runs/{run_id}/retry' does not exist on type 'Endpoints'.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed.
Exit code: 2

[BUG]: `position` marked necessary in `createReview` while it's not

What happened?

In the createReview method, the comment's position is marked as necessary according to TypeScript's typings, but the documentation states it's not: https://docs.github.com/en/rest/pulls/reviews?apiVersion=2022-11-28#create-a-review-for-a-pull-request

Versions

  "dependencies": {
    "@actions/core": "^1.2.6",
    "@actions/exec": "^1.0.4",
    "@actions/github": "^4.0.0"
  },
  "devDependencies": {
    "@types/jest": "^26.0.10",
    "@types/node": "^14.6.1",
    "@typescript-eslint/eslint-plugin": "^3.10.1",
    "@typescript-eslint/parser": "^3.10.1",
    "@vercel/ncc": "^0.24.0",
    "eslint": "^7.7.0",
    "eslint-config-sentry": "^1.43.0",
    "eslint-plugin-jest": "^23.20.0",
    "eslint-plugin-prettier": "^3.1.4",
    "husky": "^4.2.5",
    "jest": "^26.4.2",
    "jest-circus": "^26.4.2",
    "js-yaml": "^3.13.1",
    "lint-staged": "^10.2.13",
    "prettier": "^2.1.1",
    "ts-jest": "^26.3.0",
    "typescript": "^4.0.2"
  }

node is v19.5

Relevant log output

src/createReviewCommentsFromPatch.ts:74:7 - error TS2322: Type '{ path: string; body: string; side: string; start_side: string; start_line: number | undefined; line: number; }[]' is not assignable to type 'PullsCreateReviewParamsComments[]'.
  Property 'position' is missing in type '{ path: string; body: string; side: string; start_side: string; start_line: number | undefined; line: number; }' but required in type 'PullsCreateReviewParamsComments'.

74       comments,
         ~~~~~~~~

  node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts:39740:5
    39740     position: number;
              ~~~~~~~~
    'position' is declared here.

Code of Conduct

  • I agree to follow this project's Code of Conduct

[BUG]: No way to add new methods to octokit.rest.repos in v7

What happened?

I maintain octokit-commit-multiple-files, which has stopped working with plugin-rest-endpoint-methods.js 7.0. (Bug report: mheap/octokit-commit-multiple-files#110)

It seems to be related to the refactoring in #622

I previously attached a new method to octokit.rest.repos like so:

module.exports = function (octokit) {
  octokit.rest.repos.createOrUpdateFiles = plugin.bind(null, octokit);
};

Is there a way to register new methods after this refactoring?

Versions

@octokit/rest 19.0.7
Node.js v18.15.0

Relevant log output

/private/tmp/octokit-test/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js:1929
    const { decorations, endpointDefaults } = endpointMethodsMap.get(scope).get(methodName);
            ^

TypeError: Cannot destructure property 'decorations' of 'endpointMethodsMap.get(...).get(...)' as it is undefined.
    at Object.get (/private/tmp/octokit-test/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js:1929:13)
    at /private/tmp/octokit-test/index.js:14:44
    at Object.<anonymous> (/private/tmp/octokit-test/index.js:32:3)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47

Node.js v18.15.0

Code of Conduct

  • I agree to follow this project's Code of Conduct

Hello

What’s missing?

Why?

Alternatives you tried

octokit.repos.deleteDeployment doesn't exist

What happened?

Trying to use octokit.repos.deleteDeployment but function doesn't exist thus resulting in exception being thrown.

What did you expect to happen?

Expected it to be there since it's part of the documentation

What the problem might be

I don't know but I can say as much that using octokit.request('DELETE /repos/:owner/:repo/deployments/:deployment_id',{}) works.

Add @octokit/core as peerDependency

This is a follow up issue to octokit/plugin-paginate-rest.js#124 (comment)

We need to add @octokit/core as a peerDependency to address a problem with yarn 2. It is something I planned to do anyway, but wanted to figure out automated testing to assure compatibility of the plugins with the latest @octokit/core.

I only want to define compatibility with the lowest version, in this case v3. Compare pull request https://github.com/octokit/plugin-paginate-rest.js/pull/130/files.

I would appreciate help, this is a great issue for a first-time contributor

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this 💪.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


Cannot push to the Git repository.

semantic-release cannot push the version tag to the branch master on the remote Git repository with URL https://x-access-token:[secure]@github.com/octokit/plugin-rest-endpoint-methods.js.

This can be caused by:


Good luck with your project ✨

Your semantic-release bot 📦🚀

Just not working (with octokit/rest v16)

Here's my code:

const { Octokit } = require('@octokit/rest');
const {retry} = require('@octokit/plugin-retry')
const {paginate} = require('@octokit/plugin-paginate-rest')
const {endpoints} = require('@octokit/plugin-rest-endpoint-methods');
const MyOctokit = Octokit.plugin(retry, paginate, endpoints);

octokit = new MyOctokit({
    auth: "token " + process.env.GIT_TOKEN,
    previews: ["luke-cage-preview", "hellcat-preview", "symmetra-preview"],
});

async function tester() {
    const list = await octokit.paginate(octokit.activity.listWatchedReposForAuthenticatedUser)
    console.log(`got back ${list.length} repos`)
}

tester().then().catch(err => {
    console.dir(err)
})

What happens is that when I look at the list object, it contains just a collection of endpoint URLs. What am I missing??

Compile error regarding rest endpoint method types

I am trying to compile the GH integration code with the following dependencies:

"dependencies": {
    "@octokit/types": "^6.37.0",
    "@octokit/rest": "^18.12.0",
    "@octokit/plugin-paginate-rest": "^2.19.0",
    "@octokit/plugin-rest-endpoint-methods": "^5.15.0"
  },
  "devDependencies": {
    "eslint": "^7.8.1",
    "typescript": "^3.9.7",
    "@zeit/ncc": "^0.22.3"
  }

NodeJS version 14.19.1, npm version 6.14.16

What happened?
An error is thrown on the compile stage

> tsc

node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts:437:60 - error TS2339: Property 'POST /content_references/{content_reference_id}/attachments' does not exist on type 'Endpoints'.

437             parameters: RequestParameters & Omit<Endpoints["POST /content_references/{content_reference_id}/attachments"]["parameters"], "baseUrl" | "headers" | "mediaType">;
                                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts:438:33 - error TS2339: Property 'POST /content_references/{content_reference_id}/attachments' does not exist on type 'Endpoints'.

438             response: Endpoints["POST /content_references/{content_reference_id}/attachments"]["response"];
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts:441:60 - error TS2339: Property 'POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments' does not exist on type 'Endpoints'.

441             parameters: RequestParameters & Omit<Endpoints["POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments"]["parameters"], "baseUrl" | "headers" | "mediaType">;
                                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts:442:33 - error TS2339: Property 'POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments' does not exist on type 'Endpoints'.

442             response: Endpoints["POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments"]["response"];
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 4 errors.

What did you expect to happen?

Compilation without errors.

What the problem might be

I suspect that it is somehow related to this issue, but I have version that were issued much lated than the ones described in the fix of this issue.

How to update some of the endpoints

Hi!

I've trying to figure out by reading the CONTRIBUTING.md file and few of the merged PRs how this repository updates the endpoints but I'm still not very sure if there is an automated process... and also what's the process to release new versions of the library

There are few endpoints that I see are outdated given what the official GH docs say. Few examples are:

  1. https://docs.github.com/en/rest/reference/repos#get-repository-permissions-for-a-user
    This endpoint has a new field (role_name), that's not exposed by this lib

  2. https://docs.github.com/en/rest/reference/repos#update-branch-protection
    This endpoint accepts a new attribute (required_status_checks.checks) that's not supported here

What would be the process to update these two calls?

TypeScript compilation issues in probot/octokit with 4.13.1

What happened?

The latest release of plugin-rest-endpoint-methods is causing compilation errors for @octokit/rest and probot:

node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts:1761:60 - error TS2339: Property 'POST /repos/{owner}/{repo}/environments/{environment_name}' does not exist on type 'Endpoints'.

1761             parameters: RequestParameters & Omit<Endpoints["POST /repos/{owner}/{repo}/environments/{environment_name}"]["parameters"], "baseUrl" | "headers" | "mediaType">;
                                                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts:1762:33 - error TS2339: Property 'POST /repos/{owner}/{repo}/environments/{environment_name}' does not exist on type 'Endpoints'.

1762             response: Endpoints["POST /repos/{owner}/{repo}/environments/{environment_name}"]["response"];

See: googleapis/release-please#805, googleapis/repo-automation-bots#1462

What did you expect to happen?

Compilation should not throw errors

What the problem might be

ChecksListSuitesForRefResponseCheckSuitesItem is missing keys

What happened?

The ChecksListSuitesForRefResponseCheckSuitesItem type is missing keys that exist in the actual object. They are:

  • created_at
  • updated_at
  • latest_check_runs_count
  • check_runs_url
  • head_commit

And are missing from the documention at https://developer.github.com/v3/checks/suites/#list-check-suites-for-a-specific-ref

What did you expect to happen?

The keys to exist.

What the problem might be

How this repo generates its types.


Reproduced on runkit at https://runkit.com/sean-krail/octokit-plugin-rest-endpoint-methods.js

Dependency Dashboard

This issue contains a list of Renovate updates and their statuses.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to ignore the schedule.

  • fix(deps): lock file maintenance

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.


  • Check this box to trigger a request for Renovate to run again on this repository

Remove unnecessary step for CodeQL workflow

What’s missing?
Remove unnecessary step for CodeQL workflow:

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

Why?
Right now, when CodeQL workflow runs, it prints the following warning message:

Output
  [CodeQL-Build](https://github.com/octokit/plugin-rest-endpoint-methods.js/runs/5705550731?check_suite_focus=true)
1 issue was detected with this workflow: git checkout HEAD^2 is no longer necessary. Please remove this step as Code Scanning recommends analyzing the merge commit for best results.

Example: https://github.com/octokit/plugin-rest-endpoint-methods.js/actions/runs/2045651822

URGENT: *TypeScript compiler* build is failing with new update

What happened?
TypeScript compiler depends on this, and it appears that the latest patch has changed some type information which is causing TS compiler build process to fail for versions 3.9+

Errors

[21:44:13] Finished 'generateLibs' after 571 ms
node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts:961:60 - error TS2339: Property 'GET /user/:migration_id/repositories' does not exist on type 'Endpoints'.

961             parameters: RequestParameters & Omit<Endpoints["GET /user/:migration_id/repositories"]["parameters"], "baseUrl" | "headers" | "mediaType">;
                                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts:962:33 - error TS2339: Property 'GET /user/:migration_id/repositories' does not exist on type 'Endpoints'.

962             response: Endpoints["GET /user/:migration_id/repositories"]["response"];
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@octokit/plugin-paginate-rest/dist-types/generated/paginating-endpoints.d.ts:987:31 - error TS2339: Property 'GET /user/:migration_id/repositories' does not exist on type 'Endpoints'.

987         parameters: Endpoints["GET /user/:migration_id/repositories"]["parameters"];
                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@octokit/plugin-paginate-rest/dist-types/generated/paginating-endpoints.d.ts:988:29 - error TS2339: Property 'GET /user/:migration_id/repositories' does not exist on type 'Endpoints'.

988         response: Endpoints["GET /user/:migration_id/repositories"]["response"];
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 4 errors.

`Create Check` missing required properties in `scripts/generated/endpoints.json`

What happened?
Expected required properties in documentation for create check run are missing:

  • name
  • head_sha

Instead a strange * property appears (scripts/update-endpoints/generated/endpoints.json Line 9888):

Click to expand!
  "parameters": [
    {
      "name": "owner",
      "description": "",
      "in": "PATH",
      "type": "string",
      "required": true,
      "enum": null,
      "allowNull": false,
      "mapToData": null,
      "validation": null,
      "alias": null,
      "deprecated": null
    },
    {
      "name": "repo",
      "description": "",
      "in": "PATH",
      "type": "string",
      "required": true,
      "enum": null,
      "allowNull": false,
      "mapToData": null,
      "validation": null,
      "alias": null,
      "deprecated": null
    },
    {
      "name": "status",
      "description": "",
      "in": "BODY",
      "type": null,
      "required": false,
      "enum": ["queued", "in_progress"],
      "allowNull": false,
      "mapToData": null,
      "validation": null,
      "alias": null,
      "deprecated": null
    },
    {
      "name": "*",
      "description": "",
      "in": "BODY",
      "type": "object",
      "required": false,
      "enum": null,
      "allowNull": false,
      "mapToData": null,
      "validation": null,
      "alias": null,
      "deprecated": null
    }
  ]

What did you expect to happen?
To get missing name and head_sha required properties when running npm run update-endpoints:fetch-json

What the problem might be
github-openapi-graphql-query lib is returning wrong info probably. Opened issue in that project: gr2m/github-openapi-graphql-query#11

Implement mapping of parameter to request body

What happened?

Before v3 (beta), the following code worked

octokit.repos.uploadReleaseAsset.endpoint({
  url: result.data.upload_url,
  headers: {
    "content-type": "text/plain"
  },
  file: Buffer.from("Hello, world!\n"),
  name: "test-upload.txt"
});

The value of the file parameter is sent directly in the request body, without a { file } namespace.

In v3.0.0-beta.1 the data is sent using the { file } namespace instead

What did you expect to happen?

What the problem might be

[BUG]: [Create Review] 422: Unprocessable Entity: Review comments is invalid and Review threads is invalid

What happened?

Use Case,

I'm using Create review PR API to create PR comments by sending multiple comments as array in single request input field comments. It works as expected.

Issue,

When I tried to split single request Create review PR API into multiple requests by limiting comments input batch array of 20 comments per API call then it succeeds for first batch but second batch request fails with error "422: Unprocessable Entity: Review comments is invalid and Review threads is invalid"

Failed response status,

422 Validation failed, or the endpoint has been spammed.

Limitation?

Do we have any maximum number/length/character limitation for comments array in single request Create review PR API input field comments

Root Cause?

Why issue happens only for multiple requests to Create review PR API? Is that due to rate limiting/spam issues for endpoint?

Versions

actions/github-script@v6 octokit-core.js/3.6.0 Node.js/16.13.0 (linux; x64)

Relevant log output

RequestError [HttpError]: Unprocessable Entity: "Review comments is invalid and Review threads is invalid"
    at /runner/_work/_actions/actions/github-script/v6/dist/index.js:6172:21
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  status: 422,
  response: {
    url: 'https://api.github.com/repos/{ORG}/{REPO}/pulls/{PR}/reviews',
    status: 422,
    headers: {
      'access-control-allow-origin': '*',
      'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
      connection: 'close',
Error: Unhandled error: HttpError: Unprocessable Entity: "Review comments is invalid and Review threads is invalid"
      'content-length': '206',
      'content-security-policy': "default-src 'none'",
      'content-type': 'application/json; charset=utf-8',
      date: 'Wed, 21 Dec 2022 07:14:45 GMT',
      'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
      server: 'GitHub.com',
      'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
      vary: 'Accept-Encoding, Accept, X-Requested-With',
      'x-accepted-oauth-scopes': '',
      'x-content-type-options': 'nosniff',
      'x-frame-options': 'deny',
      'x-github-api-version-selected': '2022-11-28',
      'x-github-media-type': 'github.v3',
      'x-github-request-id': 'FDAD:1CB0:FEC18:12B194:63A2B260',
      'x-oauth-scopes': 'repo',
      'x-ratelimit-limit': '5000',
      'x-ratelimit-remaining': '4819',
      'x-ratelimit-reset': '1671608480',
      'x-ratelimit-resource': 'core',
      'x-ratelimit-used': '181',
      'x-xss-protection': '0'
    },
    data: {
      message: 'Unprocessable Entity',
      errors: [Array],
      documentation_url: 'https://docs.github.com/rest/reference/pulls#create-a-review-for-a-pull-request'
    }
  },
  request: {
    method: 'POST',
    url: 'https://api.github.com/repos/{ORG}/{REPO}/pulls/{PR}/reviews',
    headers: {
      accept: 'application/vnd.github.-preview+json',
      'user-agent': 'actions/github-script octokit-core.js/3.6.0 Node.js/16.13.0 (linux; x64)',
      authorization: 'token [REDACTED]',
      'content-type': 'application/json; charset=utf-8'
    },
    body: '{"event":"COMMENT","commit_id":"a6f6058f93f6bc119324e4824248d6206d087b86","comments":[{COMMENTS_ARR}]}',
    request: { agent: [Agent], hook: [Function: bound bound register] }
  }
}

Code of Conduct

  • I agree to follow this project's Code of Conduct

Can not create internal repository (enterprise)

Describe the bug
I am trying to create a repository in a workflow in an enterprise organization.
Unfortunately the parameter with the value 'visibility: "internal"' seems to be ignored.

To Reproduce
Using this code snippet

uses: actions/[email protected]
[...]
const data = await github.repos.createInOrg({
    org: "test-org",
    name: "Test-Organisation",
    auto_init: true,
    visibility: "internal"
});

Expected behavior
A repo should be created, which has the status internal, instead a public one is created.

(Coming from github-script/#94)

"Add labels to an issue" code block is badly formatted and missing documentation

What happened?

The code block of addLabels.md is badly formatted (indentation is wrong), and the page is missing documentation.

Though the GitHub docs page is also rather confusing:

  • You can pass an empty array to remove all labels.

    Is that actually correct or was it copied from "Set labels for an issue" by accident? It would be rather surprising if an 'add' operation is able to delete something.

  • but GitHub recommends passing an object with the labels key

    Not quite sure what "object" means here, the previous sentence said the type is array; same applies to the "Set labels for an issue" endpoint.

  • The examples for this endpoint as well as "Set labels for an issue" seem to be copied from "list labels"; they don't actually specify labels to add / set

"cancelInvitation" not found

I get error Unhandled error: TypeError: github.orgs.cancelInvitation is not a function with this code:

- name: CancelInvitation
  uses: actions/github-script@v4
  [...]
  script: |
       github.orgs.cancelInvitation({
                org: "organization",
                invitation_id: 00000,
        });

A call from console.log('Test: ', github.orgs); shows that the method is really missing.

Another little question:
I use allway in my GH-Workflows the octokit methods with "github." instead of "octokit.rest."
Wrong?

Typescript: Property 'GET /repos/:owner/:repo/code-scanning/analyses' or 'sarifs' or 'alert_number' does not exist on type 'Endpoints'.

What happened?
Trying to compile in Typescript - getting the following error:


node_modules/@octokit/rest/node_modules/@octokit/plugin-paginate-rest/dist-types/generated/paginating-endpoints.d.ts:557:31 - error TS2339: Property 'GET /repos/:owner/:repo/code-scanning/analyses' does not exist on type 'Endpoints'.

557         parameters: Endpoints["GET /repos/:owner/:repo/code-scanning/analyses"]["parameters"];
                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@octokit/rest/node_modules/@octokit/plugin-paginate-rest/dist-types/generated/paginating-endpoints.d.ts:558:29 - error TS2339: Property 'GET /repos/:owner/:repo/code-scanning/analyses' does not exist on type 'Endpoints'.

558         response: Endpoints["GET /repos/:owner/:repo/code-scanning/analyses"]["response"];
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts:519:60 - error TS2339: Property 'GET /repos/:owner/:repo/code-scanning/alerts/:alert_number' does not exist on type 'Endpoints'.

519             parameters: RequestParameters & Omit<Endpoints["GET /repos/:owner/:repo/code-scanning/alerts/:alert_number"]["parameters"], "baseUrl" | "headers" | "mediaType">;
                                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts:520:33 - error TS2339: Property 'GET /repos/:owner/:repo/code-scanning/alerts/:alert_number' does not exist on type 'Endpoints'.

520             response: Endpoints["GET /repos/:owner/:repo/code-scanning/alerts/:alert_number"]["response"];
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts:527:60 - error TS2339: Property 'GET /repos/:owner/:repo/code-scanning/analyses' does not exist on type 'Endpoints'.

527             parameters: RequestParameters & Omit<Endpoints["GET /repos/:owner/:repo/code-scanning/analyses"]["parameters"], "baseUrl" | "headers" | "mediaType">;
                                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts:528:33 - error TS2339: Property 'GET /repos/:owner/:repo/code-scanning/analyses' does not exist on type 'Endpoints'.

528             response: Endpoints["GET /repos/:owner/:repo/code-scanning/analyses"]["response"];
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts:531:60 - error TS2339: Property 'PATCH /repos/:owner/:repo/code-scanning/alerts/:alert_number' does not exist on type 'Endpoints'.

531             parameters: RequestParameters & Omit<Endpoints["PATCH /repos/:owner/:repo/code-scanning/alerts/:alert_number"]["parameters"], "baseUrl" | "headers" | "mediaType">;
                                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts:532:33 - error TS2339: Property 'PATCH /repos/:owner/:repo/code-scanning/alerts/:alert_number' does not exist on type 'Endpoints'.

532             response: Endpoints["PATCH /repos/:owner/:repo/code-scanning/alerts/:alert_number"]["response"];
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts:535:60 - error TS2339: Property 'POST /repos/:owner/:repo/code-scanning/sarifs' does not exist on type 'Endpoints'.

535             parameters: RequestParameters & Omit<Endpoints["POST /repos/:owner/:repo/code-scanning/sarifs"]["parameters"], "baseUrl" | "headers" | "mediaType">;
                                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts:536:33 - error TS2339: Property 'POST /repos/:owner/:repo/code-scanning/sarifs' does not exist on type 'Endpoints'.

536             response: Endpoints["POST /repos/:owner/:repo/code-scanning/sarifs"]["response"];
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

using "@octokit/rest": "^18.0.6",

My code is:

      return this.octokit.repos
        .getContent({ owner, repo, path: gitPath, ref: branch })
        .then((res) => { 
....

What did you expect to happen?
It should compile

Very big misunderstanding /NOT ME!

Hello,

I have a big problem. And I knew something was wrong. As I also stated in my email that someone had access to my my previous email address to sign into github.

I am sick. And fatigued. Just so I know what to do with this problem. As I do not know how or what it is that you need, can you please let me know?? And I will do my best to provide whatever it is you need. Even though I really don't know what is a json file.

I am just afraid of my personal things and important files to be gone as many did!

Please let me know how I can help. And I will do my best. Just please don't do anything with my files. And if you can stop this on me please and let's take action together as I was a member in github a long time ago.

Awaiting your response. Thank you.

I would also love this to be shared across everyone who thinks that I am the target! Because this is not fare at all. We could've just talked from the beginning about this. Rather than attacking my phone with all these bots, making me think I'm a part of a new development! Which was all a big holks????

Not a right approach at all. If it was surely the target? Fine go for it. But IT IS NOT ME AND I DO NOT KNOW WHAT IS GOING ON!!!

PLEASE HELP!

An in-range update of @octokit/graphql is breaking the build 🚨


🚨 Reminder! Less than one month left to migrate your repositories over to Snyk before Greenkeeper says goodbye on June 3rd! 💜 🚚💨 💚

Find out how to migrate to Snyk at greenkeeper.io


The devDependency @octokit/graphql was updated from 4.3.1 to 4.4.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@octokit/graphql is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • test (12): There are 1 failures, 0 warnings, and 0 notices.
  • test (10): There are 2 failures, 0 warnings, and 0 notices.

Release Notes for v4.4.0

4.4.0 (2020-05-07)

Bug Fixes

  • package: update universal-user-agent to version 5.0.0 (6223d69)

Features

  • add mediaType to non variable options (#84) (f04c0e1)
FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.