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(gitlab): allow override gitAuthor #11408

Merged
merged 1 commit into from
Aug 24, 2021
Merged

feat(gitlab): allow override gitAuthor #11408

merged 1 commit into from
Aug 24, 2021

Conversation

viceice
Copy link
Member

@viceice viceice commented Aug 24, 2021

Changes:

Do not try to fetch gitAuthor if it's already user defined, renovate will ignore it anyways

Context:

This allows to use $CI_JOB_TOKEN to do yome dry run / run renovate withour PAT on gitlab.
https://gitlab.com/renovate-bot/renovate-runner/-/merge_requests/202

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 tick 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

@viceice viceice requested a review from rarkins August 24, 2021 14:06
@viceice viceice added the platform:gitlab GitLab Platform label Aug 24, 2021
@viceice
Copy link
Member Author

viceice commented Aug 24, 2021

let gitAuthor: string;
// istanbul ignore else
if (config?.gitAuthor) {
logger.debug(`Using configured gitAuthor (${config.gitAuthor})`);
gitAuthor = config.gitAuthor;
} else if (platformInfo?.gitAuthor) {
logger.debug(`Using platform gitAuthor: ${String(platformInfo.gitAuthor)}`);
gitAuthor = platformInfo.gitAuthor;
} else {
logger.debug(
'Using default gitAuthor: Renovate Bot <renovate@whitesourcesoftware.com>'
);
gitAuthor = 'Renovate Bot <renovate@whitesourcesoftware.com>';
}

@viceice
Copy link
Member Author

viceice commented Aug 24, 2021

ref #7273

@viceice viceice merged commit ec549af into main Aug 24, 2021
@viceice viceice deleted the feat/gitlab-git-author branch August 24, 2021 17:07
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 26.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
platform:gitlab GitLab Platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants