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

gitlab: AddCollaborator tell when user is a member #299

Merged

Conversation

manuelstein
Copy link

Fixing AddCollaborator to tell when a user is already a member:

  • response 409 Conflict signals user having already been a member
    GitLab doesn't implement the invite/accept workflow:
  • successfully adding a member also reports it as being a member

This is to prevent client code continuing with the invite/accept workflow after calling AddCollaborator.
E.g. jenkins-x-plugins/jx-project#454

@jenkins-x-bot
Copy link

Hi @manuelstein. Thanks for your PR.

I'm waiting for a jenkins-x or todo member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the jenkins-x/lighthouse repository.

Copy link

@LinuxSuRen LinuxSuRen left a comment

Choose a reason for hiding this comment

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

hi @manuelstein you might just forget to get check the ci status. Please take a look at it.

@manuelstein
Copy link
Author

what is "check ci status" even supposed to mean in this context? In case of GitLab, the SCM client returns an error with the 409 status, meaning the user is already a member and the code fails the task at this point.

@msvticket
Copy link
Member

If you make the commit message conform to semantic commit messages we can get this merged

/ok-to-test
/assign

Fixing AddCollaborator to tell when a user is already a member:
- response 409 Conflict signals user having already been a member
GitLab doesn't implement the invite/accept workflow:
- successfully adding a member also reports it as being a member

Signed-off-by: Manuel Stein <[email protected]>
@msvticket
Copy link
Member

/approve

@jenkins-x-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: msvticket

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@msvticket msvticket removed their assignment Aug 31, 2023
@jenkins-x-bot jenkins-x-bot merged commit 1a237c8 into jenkins-x:main Aug 31, 2023
3 checks passed
@jenkins-x-bot
Copy link

@manuelstein: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
lint 3bfe234 link /test lint

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the jenkins-x/lighthouse repository. I understand the commands that are listed here.

@LinuxSuRen
Copy link

Confused about this.

image

@manuelstein
Copy link
Author

manuelstein commented Sep 6, 2023

If you make the commit message conform to semantic commit messages we can get this merged

/ok-to-test /assign

Ah, so it was all about the commit msg not following semver 😌
Sorry, @LinuxSuRen, I couldn't find anything that tells me what's wrong with the PR, so I kind of related your comment to the code change and it just didn't make sense 😊
As third party, I can't access the CI dashboard, e.g. the lint job failing above points to http:https://dashboard-jx.infra.jenkins-x.rocks/namespaces/jx/pipelineruns/jenkins-x-go-scm-pr-299-lint-kvjjp which requires authentication.

@manuelstein manuelstein deleted the fix-gitlab-add-collaborator branch September 6, 2023 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants