Skip to content
This repository was archived by the owner on Nov 8, 2018. It is now read-only.
This repository was archived by the owner on Nov 8, 2018. It is now read-only.

Github Enterprise URL and Username error #209

@NickLarsenNZ

Description

@NickLarsenNZ

Describe the bug
If I set the api_endpoint to https://github.internal/api/v3/, I can detect PRs, however when I try to set the status in a job, I get the following error in the get:

Cloning into '/tmp/build/get'...
fatal: could not read Username for 'https://github.com': No such device or address
/opt/resource/lib/commands/in.rb:27:in `output': git clone failed (RuntimeError)
	from /opt/resource/lib/commands/in.rb:110:in `<main>'

So then I also set the uri to https://github.internal/MYORG/my-repo, and receive the following error in the put:

/opt/resource/lib/commands/out.rb:97:in `block in whitelist': undefined method `gsub!' for nil:NilClass (NoMethodError)
	from /opt/resource/lib/commands/out.rb:96:in `each'
	from /opt/resource/lib/commands/out.rb:96:in `whitelist'
	from /opt/resource/lib/commands/out.rb:55:in `block in output'
	from /opt/resource/lib/commands/out.rb:52:in `each'
	from /opt/resource/lib/commands/out.rb:52:in `output'
	from /opt/resource/lib/commands/out.rb:117:in `<main>'

To Reproduce
My type and resource configuration:

- name: pull-request
  type: docker-image
  source:
    repository: jtarchie/pr

resources:
- name: pull-request-source
  type: pull-request
  source:
    access_token: ((github-token))
    username: git
    password: ((github-token))
    uri: https://((github-host))/((github-org))/((github-repo))
    api_endpoint: https://((github-host))/api/v3/
    repo: ((github-org))/((github-repo))
    base: ((branch))
    only_mergeable: true

Expected behavior
I expect to be able to use either Github.com or Github Enterprise for the same configuration if possible, otherwise perhaps clear documentation on what exactly to set when using GitHub Enterprise. (I'm happy to submit a documentation PR)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions