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

Update Action for GitHub enterprise #125

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

j-puri
Copy link

@j-puri j-puri commented Feb 7, 2023

Update Action for Use on GitHub Enterprise

Currently the action doesn't seem to be useable for Workflows running on GitHub Enterprise. This is because:

  1. getVersion() relies on Oktokit defaulting the baseUrl. In Enterprise, this baseUrl appears to be defaulted to the enterprise URL rather than public GitHub.
  2. The GitHub token provided by a Workflow may not be able to authenticate with the GitHub API on https://api.github.com/ if it limited by scope - this is needed by getVersion()
  3. The token needed by setUpTool() may therefore need to be different from the token used by getVersion().

Proposed changes:

  1. Hardcode the GitHub API URL to get releases by tag so it doesn't default to the Enterprise URL
  2. Add an additional Action input to set a different token used by the setUpTool function to set Allure job metadata. This is defaulted to ${{ github.token }} to avoid regressions.

@CLAassistant
Copy link

CLAassistant commented Feb 7, 2023

CLA assistant check
All committers have signed the CLA.

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.

2 participants