Skip to content

Conversation

@dbroemmel
Copy link

@dbroemmel dbroemmel commented Nov 20, 2025

Checklist

  • Code follows the contributing guidelines of the project
  • This PR solves an existing issue and provided solution was discussed
  • The fix has been locally tested
  • Code follows the project's coding standards
  • Unit tests covering the new feature have been added
  • All existing tests pass
  • The documentation has been updated to reflect the new feature

List of related issues or pull requests

Briefly describe the changes made in this pull request

An additional command line option has been introduced to supply a self-hosted GitLab instance. I think this is necessary since only URLs that contain gitlab.com or github.com clearly identify a platform, self-hosted GitLab instances can have arbitrary names. Assertions have been adjusted to hopefully catch wrong command line options. Instead of using gitlab.com as URL/hostname for any subsequent calls, self.instance will be used instead.
The supplied instance is then used as FQDN for self.instance, if no instance is supplied, default to gitlab.com for the GitLab platform.

Additional Notes

I agree with the technical obstacles stated in the issue, but my hope is there is only an advantage with this change. It should work better than not at all. I cannot judge if it will result in a bad user experience if errors do happen with instances that would not support the API calls made.

Tested with our local GitLab instance.

Instructions to review the pull request

# make a new temporary directory and cd into it
cd $(mktemp -d --tmpdir howfairis.XXXXXX)

# get a copy of the repo
git clone https://github.com/fair-software/howfairis .

# checkout the work from this branch 
git checkout <this branch>

# create a virtual environment named venv3
python3 -m venv venv3

# activate the virtual environment
source venv3/bin/activate

# update pip and friends
python3 -m pip install --upgrade pip wheel setuptools

# install runtime dependencies
python3 -m pip install .

# and, if you need it, the development tools
python3 -m pip install .[dev]

Keep what you need from below, extend as necessary

# run the unit tests
pytest

# tests against a live infrastructure
howfairis -s gitlab.jsc.fz-juelich.de https://gitlab.jsc.fz-juelich.de/cla-bot-development/cla-bot

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.

1 participant