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

stash: replace login to slug for FindLogin #25

Closed
wants to merge 1 commit into from

Conversation

fitz123
Copy link

@fitz123 fitz123 commented May 27, 2019

I didn't found any official description of slash's slug func, so This is pretty hack'y, but it makes the scm driver with logins like name.lastname@company.name at least usable

workaround for #31

@CLAassistant
Copy link

CLAassistant commented May 27, 2019

CLA assistant check
All committers have signed the CLA.

@bradrydzewski
Copy link
Member

I appreciate the pull request. I would prefer not to implement a hack or workaround and would rather make a permanent fix. Can you have help me understand the root cause of the problem and how we could permanently fix?

@fitz123
Copy link
Author

fitz123 commented Jul 18, 2019

As you see here: f4d22d7#diff-91862817fc90c211ea4d5904438f4310R30
login is used to query user's account. But stash server expects slug instead. So username@domain.com has 404 result meanwhile username_domain.com would work.

I tried to map search request here #26 but I'm not so familiar with go but that could give you a clue of what going on

@fitz123
Copy link
Author

fitz123 commented Jul 18, 2019

Ideally instead of https://github.com/drone/go-scm/pull/25/files#diff-91862817fc90c211ea4d5904438f4310R31
one have to slugify login with stash'es slug algorithm. But I didn't find any code or documentation of how stash'es slugify works besides replacement I've used in the PR @ -> _

@gofort
Copy link

gofort commented Jul 25, 2019

@bradrydzewski hi! I have the same problem in bitbucket ... Can you please merge provided by @fitz123 fix?

@bradrydzewski
Copy link
Member

closing this in favor of the approach in #26

jstrachan pushed a commit to jstrachan/go-scm that referenced this pull request Sep 6, 2019
fix: fix use of branch/ref and sha in PullRequestHook
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.

4 participants