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

Remove handle_comment collaborator check #211

Open
maleadt opened this issue Jan 6, 2023 · 0 comments
Open

Remove handle_comment collaborator check #211

maleadt opened this issue Jan 6, 2023 · 0 comments

Comments

@maleadt
Copy link
Collaborator

maleadt commented Jan 6, 2023

It should be up to the caller to enforce this, and it doesn't work generally anyway (requiring push permissions to the repo):

┌ Error: handle_connection handler error
│   exception =
│    Error found in GitHub reponse:
│    	Status Code: 403
│    	Message: Must have push access to view repository collaborators.
│    	Docs URL: https://docs.github.com/rest/collaborators/collaborators#check-if-a-user-is-a-repository-collaborator
│    	Errors:
│    Stacktrace:
│      [1] error(::String, ::String, ::String, ::String, ::String)
│        @ Base ./error.jl:44
│      [2] handle_response_error(r::HTTP.Messages.Response)
│        @ GitHub ~/Julia/depot/packages/GitHub/Ij6eH/src/utils/requests.jl:177
│      [3] iscollaborator(api::GitHub.GitHubWebAPI, repo::GitHub.Repo, user::String; options::Base.Pairs{Symbol, GitHub.OAuth2, Tuple{Symbol}, NamedTuple{(:auth,), Tuple{GitHub.OAuth2}}})
│        @ GitHub ~/Julia/depot/packages/GitHub/Ij6eH/src/repositories/repositories.jl:101
│      [4] #iscollaborator#93
│        @ ./none:0 [inlined]
│      [5] handle_comment(handle::Nanosoldier.var"#66#67"{Nanosoldier.Config, Vector{Nanosoldier.AbstractJob}}, event::GitHub.WebhookEvent, auth::GitHub.OAuth2, trigger::Regex, check_collab::Bool, use_access_token::Bool)
│        @ GitHub ~/Julia/depot/packages/GitHub/Ij6eH/src/activity/events.jl:186
│      [6] #260
│        @ ~/Julia/depot/packages/GitHub/Ij6eH/src/activity/events.jl:156 [inlined]
│      [7] handle_event_request(request::HTTP.Messages.Request, handle::GitHub.var"#260#262"{GitHub.OAuth2, Bool, Bool, Nanosoldier.var"#66#67"{Nanosoldier.Config, Vector{Nanosoldier.AbstractJob}}, Regex}; auth::GitHub.OAuth2, secret::String, events::Vector{String}, repos::Vector{String}, forwards::Nothing)
│        @ GitHub ~/Julia/depot/packages/GitHub/Ij6eH/src/activity/events.jl:112
│      [8] (::GitHub.var"#252#254"{GitHub.OAuth2, String, Vector{String}, GitHub.var"#260#262"{GitHub.OAuth2, Bool, Bool, Nanosoldier.var"#66#67"{Nanosoldier.Config, Vector{Nanosoldier.AbstractJob}}, Regex}})(request::HTTP.Messages.Request)
│        @ GitHub ~/Julia/depot/packages/GitHub/Ij6eH/src/activity/events.jl:79
│      [9] (::HTTP.Handlers.var"#1#2"{GitHub.var"#252#254"{GitHub.OAuth2, String, Vector{String}, GitHub.var"#260#262"{GitHub.OAuth2, Bool, Bool, Nanosoldier.var"#66#67"{Nanosoldier.Config, Vector{Nanosoldier.AbstractJob}}, Regex}}})(stream::HTTP.Streams.Stream{HTTP.Messages.Request, HTTP.ConnectionPool.Connection})
│        @ HTTP.Handlers ~/Julia/depot/packages/HTTP/RQd4C/src/Handlers.jl:58
│     [10] #invokelatest#2
│        @ ./essentials.jl:729 [inlined]
│     [11] invokelatest
│        @ ./essentials.jl:726 [inlined]
│     [12] handle_connection(f::Function, c::HTTP.ConnectionPool.Connection, listener::HTTP.Servers.Listener{Nothing, Sockets.TCPServer}, readtimeout::Int64, access_log::Nothing)
│        @ HTTP.Servers ~/Julia/depot/packages/HTTP/RQd4C/src/Servers.jl:447
│     [13] (::HTTP.Servers.var"#16#17"{HTTP.Handlers.var"#1#2"{GitHub.var"#252#254"{GitHub.OAuth2, String, Vector{String}, GitHub.var"#260#262"{GitHub.OAuth2, Bool, Bool, Nanosoldier.var"#66#67"{Nanosoldier.Config, Vector{Nanosoldier.AbstractJob}}, Regex}}}, HTTP.Servers.Listener{Nothing, Sockets.TCPServer}, Set{HTTP.ConnectionPool.Connection}, Int64, Nothing, Base.Semaphore, HTTP.ConnectionPool.Connection})()
│        @ HTTP.Servers ./task.jl:484
└ @ HTTP.Servers ~/Julia/depot/packages/HTTP/RQd4C/src/Servers.jl:461
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

No branches or pull requests

1 participant