Skip to content

Commit

Permalink
feat: change default bot email (#6740)
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins authored Jul 22, 2020
1 parent 1449e83 commit ae43b51
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 14 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
run: |
git config --global core.autocrlf false
git config --global core.symlinks true
git config --global user.email 'bot@renovateapp.com'
git config --global user.email 'renovate@whitesourcesoftware.com'
git config --global user.name 'Renovate Bot'
npm config set scripts-prepend-node-path true
echo "Node $(node --version)"
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
run: |
git config --global core.autocrlf false
git config --global core.symlinks true
git config --global user.email 'bot@renovateapp.com'
git config --global user.email 'renovate@whitesourcesoftware.com'
git config --global user.name 'Renovate Bot'
npm config set scripts-prepend-node-path true
echo "Node $(node --version)"
Expand Down Expand Up @@ -199,7 +199,7 @@ jobs:
run: |
git config --global core.autocrlf false
git config --global core.symlinks true
git config --global user.email 'bot@renovateapp.com'
git config --global user.email 'renovate@whitesourcesoftware.com'
git config --global user.name 'Renovate Bot'
yarn config set version-git-tag false
npm config set scripts-prepend-node-path true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
run: |
git config --global core.autocrlf false
git config --global core.symlinks true
git config --global user.email 'bot@renovateapp.com'
git config --global user.email 'renovate@whitesourcesoftware.com'
git config --global user.name 'Renovate Bot'
yarn config set version-git-tag false
npm config set scripts-prepend-node-path true
Expand Down
2 changes: 1 addition & 1 deletion docs/development/self-hosting.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ stringData:
## Authentication

You need to select a user account for `renovate` to assume the identity of, and generate a Personal Access Token. It is recommended to be `@renovate-bot` if you are using a self-hosted server and can pick any username you want.
It is also recommended that you configure `config.gitAuthor` with the same identity as your Renovate user, e.g. like `"gitAuthor": "Renovate Bot <bot@renovateapp.com>"`.
It is also recommended that you configure `config.gitAuthor` with the same identity as your Renovate user, e.g. like `"gitAuthor": "Renovate Bot <renovate@whitesourcesoftware.com>"`.
#### GitHub Enterprise
Expand Down
2 changes: 1 addition & 1 deletion lib/config/file.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('config/file', () => {
"logFileLevel": "warn",
"logLevel": "info",
"onboarding": false,
"gitAuthor": "Renovate Bot <bot@renovateapp.com>"
"gitAuthor": "Renovate Bot <renovate@whitesourcesoftware.com>"
"onboardingConfig": {
"extends": ["config:base"],
},
Expand Down
5 changes: 4 additions & 1 deletion lib/platform/bitbucket/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,10 @@ describe('platform/bitbucket', () => {
try {
expect(await bitbucket.getPr(3)).toMatchSnapshot();

global.gitAuthor = { email: 'bot@renovateapp.com', name: 'bot' };
global.gitAuthor = {
email: 'renovate@whitesourcesoftware.com',
name: 'bot',
};
expect(await bitbucket.getPr(5)).toMatchSnapshot();

global.gitAuthor = { email: 'jane@example.com', name: 'jane' };
Expand Down
8 changes: 4 additions & 4 deletions lib/platform/github/__fixtures__/graphql/pullrequest-1.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
{
"commit": {
"author": {
"email": "bot@renovateapp.com"
"email": "renovate@whitesourcesoftware.com"
},
"committer": {
"name": "Renovate Bot",
"email": "bot@renovateapp.com"
"email": "renovate@whitesourcesoftware.com"
},
"parents": {
"edges": [
Expand Down Expand Up @@ -55,11 +55,11 @@
{
"commit": {
"author": {
"email": "bot@renovateapp.com"
"email": "renovate@whitesourcesoftware.com"
},
"committer": {
"name": "Renovate Bot",
"email": "bot@renovateapp.com"
"email": "renovate@whitesourcesoftware.com"
},
"parents": {
"edges": [
Expand Down
2 changes: 1 addition & 1 deletion lib/platform/github/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1654,7 +1654,7 @@ describe('platform/github', () => {
});
global.gitAuthor = {
name: 'Renovate Bot',
email: 'bot@renovateapp.com',
email: 'renovate@whitesourcesoftware.com',
};
await github.initRepo({
repository: 'some/repo',
Expand Down
6 changes: 4 additions & 2 deletions lib/platform/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,10 @@ export async function initPlatform(
logger.debug(`Using configured gitAuthor (${config.gitAuthor})`);
gitAuthor = config.gitAuthor;
} else if (!platformInfo?.gitAuthor) {
logger.debug('Using default gitAuthor: Renovate Bot <bot@renovateapp.com>');
gitAuthor = 'Renovate Bot <bot@renovateapp.com>';
logger.debug(
'Using default gitAuthor: Renovate Bot <renovate@whitesourcesoftware.com>'
);
gitAuthor = 'Renovate Bot <renovate@whitesourcesoftware.com>';
} /* istanbul ignore next */ else {
logger.debug('Using platform gitAuthor: ' + platformInfo.gitAuthor);
gitAuthor = platformInfo.gitAuthor;
Expand Down

0 comments on commit ae43b51

Please sign in to comment.