Skip to content

SCMManager: createPullRequest() fails behind proxy. #55

@schnatterer

Description

@schnatterer

Behind nginx the httpResponse by SCMM looks like so for example:

httpResponse header [server:nginx/1.17.10, date:Wed, 24 Mar 2021 20:03:24 GMT, cache-control:no-cache, location:https://my.host/scm/api/v2/pull-requests/fluxv1/gitops/4]

Leading to

java.lang.NullPointerException: Cannot invoke method split() on null object

Because we look up the header like so:

return httpResponse.headers.Location.split("/")[-1]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions