Skip to content

Commit

Permalink
fix(pypi): support more project urls (#6420)
Browse files Browse the repository at this point in the history
  • Loading branch information
trim21 committed Jun 3, 2020
1 parent a3d7159 commit b085654
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/datasource/__snapshots__/metadata.spec.ts.snap
Expand Up @@ -77,7 +77,7 @@ Object {
"version": "2.2.0",
},
],
"sourceUrl": "https://github.com/nedbat/coveragepy",
"sourceUrl": "https://github.com/mkdocs/mkdocs",
}
`;

Expand Down
2 changes: 1 addition & 1 deletion lib/datasource/metadata.spec.ts
Expand Up @@ -42,7 +42,7 @@ describe('datasource/metadata', () => {
};

const datasource = datasourcePypi.id;
const lookupName = 'coverage';
const lookupName = 'mkdocs';

addMetaData(dep, datasource, lookupName);
expect(dep).toMatchSnapshot();
Expand Down
2 changes: 0 additions & 2 deletions lib/datasource/metadata.ts
Expand Up @@ -60,9 +60,7 @@ const manualSourceUrls = {
node: 'https://github.com/nodejs/node',
},
pypi: {
coverage: 'https://github.com/nedbat/coveragepy/', // bitbucket entry on pypi is wrong
mkdocs: 'https://github.com/mkdocs/mkdocs',
pillow: 'https://github.com/python-pillow/Pillow',
},
};

Expand Down
1 change: 1 addition & 0 deletions lib/datasource/pypi/index.ts
Expand Up @@ -89,6 +89,7 @@ async function getDependency(
if (
lower.startsWith('repo') ||
lower === 'code' ||
lower === 'source' ||
github_repo_pattern.exec(projectUrl)
) {
dependency.sourceUrl = projectUrl;
Expand Down

0 comments on commit b085654

Please sign in to comment.