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

feat: configure github server url #5792

Merged
merged 1 commit into from
Jun 21, 2024
Merged

feat: configure github server url #5792

merged 1 commit into from
Jun 21, 2024

Conversation

ferrarimarco
Copy link
Collaborator

@ferrarimarco ferrarimarco commented Jun 19, 2024

Proposed changes

Allow the configuration of the GitHub server URL, and add some validation rules that check for common misconfigurations.

Close #5572

Readiness checklist

In order to have this pull request merged, complete the following tasks.

Pull request author tasks

  • I checked that all workflows return a success.
  • I included all the needed documentation for this change.
  • I provided the necessary tests.
  • I squashed all the commits into a single commit.
  • I followed the Conventional Commit v1.0.0 spec.
  • I wrote the necessary upgrade instructions in the upgrade guide.
  • If this pull request is about and existing issue,
    I added the Fix #ISSUE_NUMBER or Close #ISSUE_NUMBER text to the description of the pull request.

Super-linter maintainer tasks

  • Label as breaking if this change breaks compatibility with the previous released version.
  • Label as either: automation, bug, documentation, enhancement, infrastructure.
  • Add the pull request to a milestone, eventually creating one, that matches with the version that release-please proposes.

@ferrarimarco ferrarimarco added enhancement New feature or request O: backlog 🤖 Backlog, stale ignores this label labels Jun 19, 2024
@ferrarimarco ferrarimarco added this to the 6.7.0 milestone Jun 19, 2024
@ferrarimarco ferrarimarco self-assigned this Jun 19, 2024
@ferrarimarco ferrarimarco marked this pull request as draft June 19, 2024 22:12
@ferrarimarco ferrarimarco force-pushed the fix-github-domain branch 2 times, most recently from c540579 to 09cad58 Compare June 20, 2024 07:46
Allow the configuration of the GitHub server URL, and add some
validation rules that check for common misconfigurations.

Close #5572
Copy link

@megamorf megamorf left a comment

Choose a reason for hiding this comment

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

I had a look at the changes - the logic looks solid and the implementation is clean. Good job!

I'll take it for a test drive in our GHES instance today.

Edit:

Tested it like this:

jobs:
  lint:
    runs-on: [contoso-runners]
    steps:
      - name: Checkout Code
        uses: actions/checkout@v4
        with:
          # super-linter needs the full git history to get the
          # list of files that changed across commits
          fetch-depth: 0

      - name: Super-Linter
        uses: super-linter/super-linter/slim@fix-github-domain
        env:
          GITHUB_CUSTOM_API_URL: ${{ github.api_url }}
          GITHUB_CUSTOM_SERVER_URL: ${{ github.server_url }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          # [... configuration options omitted ...]

It appears to be working correctly. Some behaviours of the linters seems to have changed as v5 was not reporting findings while v6 does but IMO that's unrelated to the GHES compatibility issue and your fix.

We cannot use GITHUB_DOMAIN as the github context does not offer a variable with just the hostname of the instance.

@ferrarimarco
Copy link
Collaborator Author

Thanks for the feedback @megamorf !

@ferrarimarco ferrarimarco marked this pull request as ready for review June 20, 2024 10:52
@ferrarimarco ferrarimarco merged commit cef1776 into main Jun 21, 2024
106 checks passed
@ferrarimarco ferrarimarco deleted the fix-github-domain branch June 21, 2024 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request O: backlog 🤖 Backlog, stale ignores this label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support configuring the GitHub server URL
2 participants