Skip to content

Request: Adding Github Host to context to enable writing actions for github enterprise #576

Description

@adam-bratin

Describe the enhancement
Currently most actions are written to only work with repos hosted on Github.com. As Github enterprise 2.22.0 has been released with github actions beta I was hoping to enable adding to the github context a host variable. This will enable actions using context from '@actions/github' to set up a gh client consistently without the action developer needing to know where the action is being used.
Code Snippet
I am assuming adding a line after here

this.runId = parseInt(process.env.GITHUB_RUN_ID as string, 10)
:

this.host = process.env.GITHUB_HOST ?? "https://api.github.com" as string 

Additional information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions