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(bitbucket-server)!: autodetect gitAuthor if possible #29525

Merged
merged 9 commits into from
Jul 25, 2024

Conversation

amezin
Copy link
Contributor

@amezin amezin commented Jun 8, 2024

Changes

Try to detect gitAuthor on Bitbucket Server during initialization.

Context

Unfortunately, there seems to be no API endpoint to get the information about the currently authenticated user. So I'm using an endpoint that depends on username. Actually, the endpoint depends on username slug, but the rules to convert username to slug aren't clear. So I'm just trying to pass the username as is, and hope it works. For all real usernames that I tried - it works. If it fails, the failure isn't fatal.

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

Copy link
Collaborator

@rarkins rarkins left a comment

Choose a reason for hiding this comment

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

This is a breaking change so should be part of v38

@rarkins rarkins changed the title feat(bitbucket-server): autodetect gitAuthor if possible feat(bitbucket-server)!: autodetect gitAuthor if possible Jun 8, 2024
@rarkins
Copy link
Collaborator

rarkins commented Jun 8, 2024

I was under the impression that today it falls back to [email protected] for Bitbucket Server if not configured, but is that the case? I'm not seeing evidence of that in the code

@amezin
Copy link
Contributor Author

amezin commented Jun 8, 2024

I was under the impression that today it falls back to [email protected] for Bitbucket Server if not configured, but is that the case? I'm not seeing evidence of that in the code

gitAuthor ?? 'Renovate Bot <[email protected]>',

? This function (setGitAuthor) currently receives null on bitbucket-server if not configured manually

@rarkins
Copy link
Collaborator

rarkins commented Jun 8, 2024

I was under the impression that today it falls back to [email protected] for Bitbucket Server if not configured, but is that the case? I'm not seeing evidence of that in the code

gitAuthor ?? 'Renovate Bot <[email protected]>',

? This function (setGitAuthor) currently receives null on bitbucket-server if not configured manually

That's the one - I had misremembered the default bot value. I think we need to have that as gitIgnoredAuthors in such cases, to assist bitbucket server users who ran prior to v38

@amezin amezin changed the base branch from main to v38 June 9, 2024 14:54
@amezin
Copy link
Contributor Author

amezin commented Jun 9, 2024

I think we need to have that as gitIgnoredAuthors in such cases, to assist bitbucket server users who ran prior to v38

Do you mean "add it automatically to the config after successful autodetect on bitbucket-server"?

Copy link
Collaborator

@rarkins rarkins left a comment

Choose a reason for hiding this comment

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

Still needs gitIgnoredAuthors set too

lib/modules/platform/bitbucket-server/index.ts Outdated Show resolved Hide resolved
lib/modules/platform/bitbucket-server/index.ts Outdated Show resolved Hide resolved
@amezin amezin requested a review from rarkins July 1, 2024 14:06
@rarkins rarkins requested review from secustor and viceice July 2, 2024 10:36
@viceice viceice added the breaking Breaking change, requires major version bump label Jul 22, 2024
@viceice viceice added this to the v38 milestone Jul 22, 2024
Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

See reopened conversation

Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

@rarkins I don't see any breaking changes. 🤔

@viceice viceice requested a review from rarkins July 23, 2024 06:21
@rarkins rarkins force-pushed the v38 branch 2 times, most recently from 82b75c6 to ee6c5b6 Compare July 23, 2024 12:50
@rarkins
Copy link
Collaborator

rarkins commented Jul 23, 2024

@amezin can you try undoing your last commit and trying again?

@amezin
Copy link
Contributor Author

amezin commented Jul 23, 2024

@amezin can you try undoing your last commit and trying again?

I don't get how it should help (and what exactly you mean).

I can rebase this PR on top of new v38 and force-push.

@rarkins
Copy link
Collaborator

rarkins commented Jul 23, 2024

Anything you can do to de-conflict would work

@rarkins
Copy link
Collaborator

rarkins commented Jul 23, 2024

I think a change in fit author is breaking because users may have settings based on it

@viceice
Copy link
Member

viceice commented Jul 24, 2024

needs interactive rebase onto v38

@rarkins rarkins merged commit 0762881 into renovatebot:v38 Jul 25, 2024
35 checks passed
rarkins added a commit that referenced this pull request Jul 25, 2024
rarkins added a commit that referenced this pull request Jul 25, 2024
rarkins added a commit that referenced this pull request Jul 25, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking Breaking change, requires major version bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants