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

Adding support for different target host than the executing environment #255

Merged
merged 5 commits into from
Mar 13, 2024

Conversation

rajbos
Copy link
Contributor

@rajbos rajbos commented Jun 23, 2023

Description

See the description in #254 as well. We use this on action on our private GitHub Enterprise Server to fork actions on github.com. Since the action runs in the local context by default, we need to make some changes to support this. This PR adds a new optional parameter to support targeting a different environment. If the variable is empty, the current behavior is still the same: it uses the current environment from actions/core.

If the new parameter targetInstanceUrl is set, it will configure Octokit with that parameter. The rest of the code is the same.

Fixes #254

Type of Change

  • Bug Fix
  • New Feature
  • Breaking Change
  • Refactor
  • Documentation
  • Other (please describe)

Checklist

  • I have read the contributing guidelines
  • Existing issues have been referenced (where applicable)
  • I have verified this change is not present in other open pull requests
  • Functionality is documented
  • All code style checks pass
  • New code contribution is covered by automated tests ➡️ cannot be done from a github.com environment, as there is nothing else to target.
  • All new and existing tests pass

Tagging @lelia for visibility 😄.

@lelia lelia self-assigned this Jul 18, 2023
@github-actions
Copy link

Automatically marking pull request as stale due to lack of activity

@github-actions github-actions bot added the stale label Sep 17, 2023
@rajbos
Copy link
Contributor Author

rajbos commented Sep 18, 2023

@lelia anything I can do to help with this? I can confirm it works as intended on our internal environment 🤗.

@github-actions github-actions bot removed the stale label Sep 24, 2023
Copy link
Collaborator

@lelia lelia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rajbos Sorry for the delay here, I haven't worked at Wayfair since the start of the year, so my primary focus has been on other OSS projects at my new company 😔

While I haven't had a chance to explicitly test out the parameter using a GHE instance yet, the overall changes LGTM. My one ask would be that you document the new parameter in the README Inputs section following the same pattern as other params (so, datatype, required/not, description, and example input).

Bonus points if you expand the Usage section to include a code snippet for how one would construct this action to target a dummy GHE instance. Thanks and apologies again for the wait!

@lelia
Copy link
Collaborator

lelia commented Oct 11, 2023

BTW, feel free to update this PR description to say something like "Fixes #254" so that the related issue will auto-close once this PR merges!

Copy link

Automatically marking pull request as stale due to lack of activity

@github-actions github-actions bot added the stale label Dec 17, 2023
@lelia lelia removed the stale label Dec 21, 2023
Copy link

Automatically marking pull request as stale due to lack of activity

@rajbos
Copy link
Contributor Author

rajbos commented Mar 2, 2024

@lelia : requested changes have been added, please review.

README.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@lelia lelia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rajbos Changes LGTM! Thanks again for the contribution & your patience 🙂

README.md Outdated Show resolved Hide resolved
@lelia lelia merged commit 5a65682 into wayfair-incubator:main Mar 13, 2024
7 checks passed
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.

Support other GitHub instance then the current one in the executing workflow
2 participants