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

pr: fix error on closing/reopening #676

Merged
merged 2 commits into from
Nov 28, 2024

Conversation

macovsky
Copy link
Contributor

@macovsky macovsky commented Nov 12, 2024

Describe what this PR does / why we need it

currently when you close/reopen pr an error pops up complaining about indexing autoMergeRequest

Does this pull request fix one issue?

NONE

Describe how to verify it

close/reopen pr to see there's no error

Checklist

  • Passing tests and linting standards
  • Documentation updates in README.md and doc/octo.txt

@macovsky macovsky changed the title fix error on closing/reopening pr pr: fix error on closing/reopening Nov 12, 2024
@wilkinson4
Copy link

I'm also experiencing a similar error when I'm creating a PR via :Octo pr create

|| #22768 - `Log errors when an active device is missing to see which patients it's` created successfully
|| Error executing vim.schedule lua callback: ....local/share/nvim/lazy/octo.nvim/lua/octo/ui/writers.lua:499: attempt to index field 'autoMergeRequest' (a nil value)
|| stack traceback:
|| 	....local/share/nvim/lazy/octo.nvim/lua/octo/ui/writers.lua:499: in function 'write_details'
|| 	...share/nvim/lazy/octo.nvim/lua/octo/model/octo-buffer.lua:106: in function 'render_issue'
|| 	...inson/.local/share/nvim/lazy/octo.nvim/lua/octo/init.lua:271: in function 'create_buffer'
|| 	...n/.local/share/nvim/lazy/octo.nvim/lua/octo/commands.lua:1030: in function 'cb'
|| 	...on/.local/share/nvim/lazy/octo.nvim/lua/octo/gh/init.lua:163: in function ''
|| 	vim/_editor.lua: in function <vim/_editor.lua:0>

Also, if I open a PR in a buffer the only thing displaying is the PR title, but in telescope it looks fine.

Screenshot 2024-11-13 at 10 35 49 AM Screenshot 2024-11-13 at 10 36 27 AM

Here is my octo config:

    {
        'pwntester/octo.nvim',
        dependencies = {
            'nvim-lua/plenary.nvim',
            'nvim-telescope/telescope.nvim',
            'nvim-tree/nvim-web-devicons',
        },
        config = function()
            require "octo".setup({
                suppress_missing_scope = {
                    projects_v2 = true,
                },
                users = 'assignable'
            })
        end
    },

@pwntester pwntester merged commit 9623d65 into pwntester:master Nov 28, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants