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

[BUG]: Plugin not compatible with ProbotOctokit #278

Open
mcaulifn opened this issue Jul 19, 2024 · 1 comment
Open

[BUG]: Plugin not compatible with ProbotOctokit #278

mcaulifn opened this issue Jul 19, 2024 · 1 comment
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented

Comments

@mcaulifn
Copy link

What happened?

Tried to use as plugin and direct usage:

const myProbot = ProbotOctokit.plugin(composeCreateOrUpdateTextFile)

OR

await composeCreateOrUpdateTextFile(probotOctokit, {
    owner,
    repo,
    path: `${fileName}`,
    message: commitMessage,
    content: body,
    branch: branchName
  })

Would expect plugin to be usable with probot as well.

Versions

@octokit/core: 6.1.2
@octokit/plugin-create-or-update-text-file 5.1.0
probot 13.3.6
Node v21.4.0

Relevant log output

Argument of type '(octokit: Octokit, options: Options) => Promise<Response>' is not assignable to parameter of type 'OctokitPlugin'.
  Types of parameters 'octokit' and 'octokit' are incompatible.
    Type 'import("probot/node_modules/probot/node_modules/@octokit/core/dist-types/index").Octokit' is not assignable to type 'import("probot/node_modules/@octokit/core/dist-types/index").Octokit'.
      The types of 'hook.before' are incompatible between these types.
        Type '<Name extends keyof Hooks>(name: Name, beforeHook: BeforeHook<GetType<Hooks[Name], "Options", "O">>) => void' is not assignable to type '<Name extends keyof Hooks>(name: Name, beforeHook: BeforeHook<GetType<Hooks[Name], "Options">>) => void'.
          Types of parameters 'beforeHook' and 'beforeHook' are incompatible.
            Types of parameters 'options' and 'options' are incompatible.
              Type 'GetType<Hooks[Name], "Options", "O">' is not assignable to type 'GetType<Hooks[Name], "Options">'.
                Type 'Hooks[Name][keyof Hooks[Name] & "Options"] | ("O" extends keyof Hooks[Name] ? Hooks[Name][keyof Hooks[Name] & "O"] : any)' is not assignable to type 'GetType<Hooks[Name], "Options">'.
                  Type 'Hooks[Name][keyof Hooks[Name] & "Options"]' is not assignable to type 'GetType<Hooks[Name], "Options">'.
                    Type 'Hooks[Name]["Options"]' is not assignable to type 'GetType<Hooks[Name], "Options">'.


### Code of Conduct

- [X] I agree to follow this project's Code of Conduct
@mcaulifn mcaulifn added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Jul 19, 2024
Copy link

👋 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 labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@kfcampbell kfcampbell moved this from 🆕 Triage to 🔥 Backlog in 🧰 Octokit Active Jul 19, 2024
@kfcampbell kfcampbell added Status: Up for grabs Issues that are ready to be worked on by anyone and removed Status: Triage This is being looked at and prioritized labels Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented
Projects
Status: 🔥 Backlog
Development

No branches or pull requests

2 participants