Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

chore update go gitlab #982

Open
wants to merge 7 commits into
base: trunk
Choose a base branch
from

Conversation

zemzale
Copy link
Collaborator

@zemzale zemzale commented Mar 17, 2022

Description

This PR updates go-gitlab library to the newest version so we can add more then
one file to snippets.

The problem here is that there is one huge nasty change that changes a lot of slices to be pointers to slices see here

There are also some good things as, no need to use the workaround for setting
the scope for environment filters when removing project variables.

There is also a change in the way how labels are treated in most places (this
actually just looks like a normalization around the library since some places
already used this custom type and some didn't).

There is quite a lot of pointer derefrencing now, and I have not done any real
testing so there might be some problems so this probably should be tested better
before merging.

Each change should be in it's own commit for easier review, but should be
squashed before merge, because most of the commits fail to build and I don't
like having commits with build failures.

Commit messages should have better explanation for most changes.

Related Issue

Resolves #872

How Has This Been Tested?

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation
  • Chore (Related to CI or Packaging to platforms)

The remove variable API didn't have option to set the enviorment scope,
so there was an workaround by hooking into the request retry option, and
setting the scope option by hand there.

This was fixed in the latest release of go-gitlab and now this can be
done simply by passing in a option object.
The upload command now takes a io.Reader and a file name. This is why we
need to pass it by hand now
This has been a change around the whole go-gitlab API
These variables are not their own specific types
@zemzale zemzale added the needs: testing Some unit or manual testing is required label Mar 17, 2022
@zemzale zemzale requested a review from profclems March 17, 2022 18:31
@ygarasab
Copy link
Contributor

hey, I've been wanting to ask this for a while, but what is the best way to set the local environment for running the tests properly?

@clemsbot
Copy link
Collaborator

This PR has been automatically marked as stale because it has not had recent activity. This message is just a reminder for the author, reviewers and assignees.

@clemsbot clemsbot added the stale label Apr 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: testing Some unit or manual testing is required size/M stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for snippets
3 participants