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

chore: spelling #7499

Merged
merged 40 commits into from
Oct 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
cf6d132
spelling: abnormal
jsoref Oct 19, 2020
029c9d6
spelling: automerge
jsoref Oct 19, 2020
f42946f
spelling: calculate
jsoref Oct 19, 2020
efd3b67
spelling: committing
jsoref Oct 19, 2020
cdc3da3
spelling: compatibility
jsoref Oct 19, 2020
c6b65de
spelling: configuration
jsoref Oct 19, 2020
f92123e
spelling: consider
jsoref Oct 19, 2020
df4ecd1
spelling: constraints
jsoref Oct 19, 2020
9ce7b11
spelling: default
jsoref Oct 19, 2020
55f9166
spelling: dependency
jsoref Oct 19, 2020
ec9d874
spelling: empty
jsoref Oct 19, 2020
2e8dae4
spelling: explicitly
jsoref Oct 19, 2020
3e3b92e
spelling: flatten
jsoref Oct 19, 2020
9e65f65
spelling: found
jsoref Oct 19, 2020
5033f68
spelling: globally
jsoref Oct 19, 2020
328d57f
spelling: inference
jsoref Oct 19, 2020
45df796
spelling: libraries
jsoref Oct 19, 2020
f166299
spelling: lowercase
jsoref Oct 19, 2020
be68fce
spelling: maintenance
jsoref Oct 19, 2020
bd27e70
spelling: message
jsoref Oct 19, 2020
cf26474
spelling: mismatch
jsoref Oct 19, 2020
34dcb6b
spelling: overridden
jsoref Oct 19, 2020
399dae7
spelling: permissions
jsoref Oct 19, 2020
3a65bc3
spelling: plugins
jsoref Oct 19, 2020
04227ba
spelling: preserves
jsoref Oct 19, 2020
b5a394a
spelling: processing
jsoref Oct 19, 2020
19d1a92
spelling: protocol
jsoref Oct 19, 2020
3fb94d4
spelling: rebasing
jsoref Oct 19, 2020
d4647b2
spelling: refactored
jsoref Oct 19, 2020
751d9ea
spelling: requirements
jsoref Oct 19, 2020
8986d8e
spelling: response
jsoref Oct 19, 2020
6f33028
spelling: satisfies
jsoref Oct 19, 2020
b0806a4
spelling: scratches
jsoref Oct 19, 2020
a18b536
spelling: security
jsoref Oct 19, 2020
047dc4b
spelling: split
jsoref Oct 19, 2020
05cf9b5
spelling: stability
jsoref Oct 19, 2020
f3cc44a
spelling: supports
jsoref Oct 19, 2020
5ac9ef7
spelling: update
jsoref Oct 19, 2020
90c3e8e
spelling: version
jsoref Oct 19, 2020
8d9a466
spelling: versioning
jsoref Oct 19, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ module.exports = {
},
],

// Makes no sense to allow type inferrence for expression parameters, but require typing the response
// Makes no sense to allow type inference for expression parameters, but require typing the response
'@typescript-eslint/explicit-function-return-type': [
'error',
{ allowExpressions: true, allowTypedFunctionExpressions: true },
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/config-presets.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ Whenever repository onboarding happens, Renovate checks if the current user/grou
- A repository called `renovate-config` under the same user/group/org with either `default.json` or `renovate.json`, or
- A repository named like `.{{platform}}` (e.g. `.github`) under the same user/group/org with `renovate-config.json`

If found, that repository's preset will be suggested as the the sole extended preset, and any existing `onboardingConfig` config will be ignored/overriden. For example the result may be:
If found, that repository's preset will be suggested as the the sole extended preset, and any existing `onboardingConfig` config will be ignored/overridden. For example the result may be:

```json
{
Expand Down
8 changes: 4 additions & 4 deletions docs/usage/configuration-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ In contrast to `reviewers`, this option adds to the existing reviewer list, rath

## aliases

The `aliases` object is used for configuring registry aliases. Currently it is needed/supported for the `helm-requiremenets` manager only.
The `aliases` object is used for configuring registry aliases. Currently it is needed/supported for the `helm-requirements` manager only.

`helm-requirements` includes this default alias:

Expand Down Expand Up @@ -721,7 +721,7 @@ Using this setting, you can selectively ignore package files that you don't want

## ignorePresets

Use this if you are extending a complex preset but don't want to use every "sub preset" that it includes. For example, consinder this config:
Use this if you are extending a complex preset but don't want to use every "sub preset" that it includes. For example, consider this config:

```json
{
Expand Down Expand Up @@ -1329,15 +1329,15 @@ Configure to `false` to disable deleting orphan branches and autoclosing PRs. De

## python

Currently the only Python package manager is `pip` - specifically for `requirements.txt` and `requirequirements.pip` files - so adding any config to this `python` object is essentially the same as adding it to the `pip_requirements` object instead.
Currently the only Python package manager is `pip` - specifically for `requirements.txt` and `requirements.pip` files - so adding any config to this `python` object is essentially the same as adding it to the `pip_requirements` object instead.

## rangeStrategy

Behaviour:

- `auto` = Renovate decides (this will be done on a manager-by-manager basis)
- `pin` = convert ranges to exact versions, e.g. `^1.0.0` -> `1.1.0`
- `bump` = e.g. bump the range even if the new version satisifies the existing range, e.g. `^1.0.0` -> `^1.1.0`
- `bump` = e.g. bump the range even if the new version satisfies the existing range, e.g. `^1.0.0` -> `^1.1.0`
- `replace` = Replace the range with a newer one if the new version falls outside it, e.g. `^1.0.0` -> `^2.0.0`
- `widen` = Widen the range with newer one, e.g. `^1.0.0` -> `^1.0.0 || ^2.0.0`
- `update-lockfile` = Update the lock file when in-range updates are available, otherwise `replace` for updates out of range. Works only for `npm` and `yarn` so far.
Expand Down
4 changes: 2 additions & 2 deletions docs/usage/dependency-pinning.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ If you're familiar with the theory of semver, you might think that you only need

#### Ranges for Libraries

A second reason for using ranges applies to "libaries" that are published as npm packages with the intention that they are used/`require()`'d by other packages. In this case, it is usually a bad idea to pin all your dependencies because it will introduce an unnecessarily narrow range (one release!) and cause most users of your package to bloat their `node_modules` with duplicates.
A second reason for using ranges applies to "libraries" that are published as npm packages with the intention that they are used/`require()`'d by other packages. In this case, it is usually a bad idea to pin all your dependencies because it will introduce an unnecessarily narrow range (one release!) and cause most users of your package to bloat their `node_modules` with duplicates.

For example, you might have pinned `foobar` to version `1.1.0` and another author pinned his/her `foobar` to dependency to `1.2.2`. Any user of both your packages will end up with npm attempting to install two separate versions of `foobar`, which might not even work. Even if both projects use a service like Renovate to keep their pinned dependencies up to date with the very latest versions, it's still not a good idea - there will always be times when one package has updated/released before the other one and they will be out of sync. e.g. there might be a space of 30 minutes where your package specifies foobar `1.1.0` and the other one specifies `1.1.1` and your joint downstream users end up with a duplicate.

Expand Down Expand Up @@ -145,7 +145,7 @@ Does pinning give you "increased" security? Undeniably. The question is not whet

Don't forget that there is some form of transitive trust too. You need to pick your direct dependencies carefully, and which versions of them you use. Hopefully in doing that you pick dependencies partly for how well _they_ look after their own dependencies and versions (e.g. do they have good enough test coverage, do they use something like Renovate to keep updated, etc?). So the reality is that even if 90% of the entries in your lock file are indirect dependencies, those are ones you have somewhat "delegated" responsibility for to your dependencies. e.g. I'd hope that Express are even better at watching their deps for breaks than I am, to use the example above.

But certainly "does it give a false sense of securty" is not a question we can really answer quantifiably.
But certainly "does it give a false sense of security" is not a question we can really answer quantifiably.

## So what's best?

Expand Down
2 changes: 1 addition & 1 deletion docs/usage/private-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Assuming the private module lookup succeeds (solutions for that are described la

If you are using a lock file (e.g. yarn's `yarn.lock` or npm's `package-lock.json`) then Renovate needs to update that lock file whenever _any_ package listed in your package file is updated to a new version.

To do this, Renovate will run `npm install` or equivalent and save the resulting lock file. If a private module hasn't been updated, it _usually_ won't matter to npm/yarn because they won't attempt to udpate its lock file entry anyway. However it's possible that the install will fail if it attempts to look up that private module for some reason, even when that private module is not the main one being updated. It's therefore better to provide Renovate with all the credentials it needs to look up private packages.
To do this, Renovate will run `npm install` or equivalent and save the resulting lock file. If a private module hasn't been updated, it _usually_ won't matter to npm/yarn because they won't attempt to update its lock file entry anyway. However it's possible that the install will fail if it attempts to look up that private module for some reason, even when that private module is not the main one being updated. It's therefore better to provide Renovate with all the credentials it needs to look up private packages.

## Supported npm authentication approaches

Expand Down
2 changes: 1 addition & 1 deletion docs/usage/self-hosting.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ Self-hosted Renovate can be configured using any of the following (or a combinat
- CLI params
- Environment params

Note that some Renovate configuratino options are _only_ available for self-hosting, and so can only be configured using one of the above methods. These are described in the [Self-hosted Configuration](./self-hosted-configuration.md) doc.
Note that some Renovate configuration options are _only_ available for self-hosting, and so can only be configured using one of the above methods. These are described in the [Self-hosted Configuration](./self-hosted-configuration.md) doc.

## Authentication

Expand Down
2 changes: 1 addition & 1 deletion lib/config/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1669,7 +1669,7 @@ const options: RenovateOptions[] = [
},
{
name: 'insecureRegistry',
description: 'explicity turn on insecure docker registry access (http)',
description: 'explicitly turn on insecure docker registry access (http)',
type: 'boolean',
stage: 'repository',
parent: 'hostRules',
Expand Down
10 changes: 5 additions & 5 deletions lib/config/presets/gitlab/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ async function getDefaultBranchName(

const res = await gitlabApi.getJson<GitLabBranch[]>(branchesUrl);
const branches = res.body;
let defautlBranchName = 'master';
let defaultBranchName = 'master';
for (const branch of branches) {
if (branch.default) {
defautlBranchName = branch.name;
defaultBranchName = branch.name;
break;
}
}

return defautlBranchName;
return defaultBranchName;
}

export async function fetchJSONFile(
Expand All @@ -35,11 +35,11 @@ export async function fetchJSONFile(
try {
const urlEncodedRepo = encodeURIComponent(repo);
const urlEncodedPkgName = encodeURIComponent(fileName);
const defautlBranchName = await getDefaultBranchName(
const defaultBranchName = await getDefaultBranchName(
urlEncodedRepo,
endpoint
);
const url = `${endpoint}projects/${urlEncodedRepo}/repository/files/${urlEncodedPkgName}/raw?ref=${defautlBranchName}`;
const url = `${endpoint}projects/${urlEncodedRepo}/repository/files/${urlEncodedPkgName}/raw?ref=${defaultBranchName}`;
return (await gitlabApi.getJson<Preset>(url)).body;
} catch (err) {
if (err instanceof ExternalHostError) {
Expand Down
2 changes: 1 addition & 1 deletion lib/datasource/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,5 @@ export interface DatasourceApi {
registryStrategy?: 'first' | 'hunt' | 'merge';
}

// TODO: remove, only for compatabillity
// TODO: remove, only for compatibility
export type Datasource = DatasourceApi;
2 changes: 1 addition & 1 deletion lib/datasource/jenkins-plugins/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ async function getJenkinsUpdateCenterResponse<T>(
};

try {
logger.debug(`jenkins-plugins: Fetching Jenkins plugns ${cache.name}`);
logger.debug(`jenkins-plugins: Fetching Jenkins plugins ${cache.name}`);
const startTime = Date.now();
response = (await http.getJson<T>(cache.dataUrl, options)).body;
const durationMs = Math.round(Date.now() - startTime);
Expand Down
4 changes: 2 additions & 2 deletions lib/datasource/nuget/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ function parseRegistryUrl(
try {
const parsedUrl = urlApi.parse(registryUrl);
let protocolVersion = 2;
const protolVersionRegExp = /#protocolVersion=(2|3)/;
const protocolVersionMatch = protolVersionRegExp.exec(parsedUrl.hash);
const protocolVersionRegExp = /#protocolVersion=(2|3)/;
const protocolVersionMatch = protocolVersionRegExp.exec(parsedUrl.hash);
if (protocolVersionMatch) {
parsedUrl.hash = '';
protocolVersion = Number.parseInt(protocolVersionMatch[1], 10);
Expand Down
2 changes: 1 addition & 1 deletion lib/manager/bazel/__snapshots__/update.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Array [
]
`;

exports[`manager/bazel/update updateDependency updates container_pull deptype and prserves comment 1`] = `
exports[`manager/bazel/update updateDependency updates container_pull deptype and preserves comment 1`] = `
"container_pull(
name=\\"hasura\\",
registry=\\"index.docker.io\\",
Expand Down
2 changes: 1 addition & 1 deletion lib/manager/bazel/extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function findBalancedParenIndex(longString: string): number {
* if one opening parenthesis -> 1
* if two opening parenthesis -> 2
* if two opening and one closing parenthesis -> 1
* if ["""] finded then ignore all [)] until closing ["""] parsed.
* if ["""] found then ignore all [)] until closing ["""] parsed.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure

* https://github.com/renovatebot/renovate/pull/3459#issuecomment-478249702
*/
let intShouldNotBeOdd = 0; // openClosePythonMultiLineComment
Expand Down
2 changes: 1 addition & 1 deletion lib/manager/bazel/update.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe('manager/bazel/update', () => {
expect(res).not.toEqual(content);
});

it('updates container_pull deptype and prserves comment', async () => {
it('updates container_pull deptype and preserves comment', async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure

const upgrade = {
depName: 'hasura',
depType: 'container_pull',
Expand Down
2 changes: 1 addition & 1 deletion lib/manager/cargo/artifacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ async function cargoUpdate(
} catch (err) /* istanbul ignore next */ {
// Two different versions of one dependency can be present in the same
// crate, and when that happens an attempt to update it with --package ${dep}
// key results in cargo exiting with error code `101` and an error mssage:
// key results in cargo exiting with error code `101` and an error message:
// "error: There are multiple `${dep}` packages in your project".
//
// If exception `err` was caused by this, we execute `updateAll` function
Expand Down
2 changes: 1 addition & 1 deletion lib/manager/dockerfile/__snapshots__/extract.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Array [
]
`;

exports[`lib/manager/dockerfile/extract extractPackageFile() handles abnoral spacing 1`] = `
exports[`lib/manager/dockerfile/extract extractPackageFile() handles abnormal spacing 1`] = `
Array [
Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
Expand Down
4 changes: 2 additions & 2 deletions lib/manager/dockerfile/extract.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ describe('lib/manager/dockerfile/extract', () => {
).deps;
expect(res).toMatchSnapshot();
});
it('handles abnoral spacing', () => {
it('handles abnormal spacing', () => {
const res = extractPackageFile(
'FROM registry.allmine.info:5005/node:8.7.0\n\n'
).deps;
Expand All @@ -94,7 +94,7 @@ describe('lib/manager/dockerfile/extract', () => {
expect(res).toMatchSnapshot();
expect(res).toHaveLength(2);
});
it('skips scratchs', () => {
it('skips scratches', () => {
const res = extractPackageFile('FROM scratch\nADD foo\n');
expect(res).toBeNull();
});
Expand Down
2 changes: 1 addition & 1 deletion lib/manager/gradle-wrapper/artifacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export async function updateArtifacts({
if (distributionUrl) {
cmd += ` --gradle-distribution-url ${distributionUrl}`;
if (newPackageFileContent.includes('distributionSha256Sum=')) {
// need to reset version, otherwise we have a checksum missmatch
// need to reset version, otherwise we have a checksum mismatch
await writeLocalFile(
packageFileName,
newPackageFileContent.replace(config.toVersion, config.currentValue)
Expand Down
4 changes: 2 additions & 2 deletions lib/manager/gradle/gradle-updates-report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function mergeDependenciesWithRepositories(
}));
}

function flatternDependencies(
function flattenDependencies(
accumulator: GradleDependencyWithRepos[],
currentValue: GradleDependencyWithRepos[]
): GradleDependencyWithRepos[] {
Expand Down Expand Up @@ -147,7 +147,7 @@ export async function extractDependenciesFromUpdatesReport(

const dependencies = gradleProjectConfigurations
.map(mergeDependenciesWithRepositories, [])
.reduce(flatternDependencies, [])
.reduce(flattenDependencies, [])
.reduce(combineReposOnDuplicatedDependencies, []);

return dependencies
Expand Down
2 changes: 1 addition & 1 deletion lib/manager/helmfile/extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export function extractPackageFile(
res.skipReason = SkipReason.LocalChart;
}

// By definition on helm the chart name should be lowecase letter + number + -
// By definition on helm the chart name should be lowercase letter + number + -
// However helmfile support templating of that field
if (!isValidChartName(res.depName)) {
res.skipReason = SkipReason.UnsupportedChartType;
Expand Down
2 changes: 1 addition & 1 deletion lib/manager/jenkins/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The Jenkins manager suppports the following format of the plugin list:
The Jenkins manager supports the following format of the plugin list:

```text
plugin1:1.2.3
Expand Down
2 changes: 1 addition & 1 deletion lib/manager/npm/extract/common.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { PackageJson } from 'type-fest';

export type NpmPackageDependeny = PackageJson.Dependency;
export type NpmPackageDependency = PackageJson.Dependency;

export interface NpmPackage extends PackageJson {
renovate?: unknown;
Expand Down
4 changes: 2 additions & 2 deletions lib/manager/npm/extract/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
PackageDependency,
PackageFile,
} from '../../common';
import { NpmPackage, NpmPackageDependeny } from './common';
import { NpmPackage, NpmPackageDependency } from './common';
import { getLockedVersions } from './locked-versions';
import { detectMonorepos } from './monorepo';
import { mightBeABrowserLibrary } from './type';
Expand Down Expand Up @@ -299,7 +299,7 @@ export async function extractPackageFile(
if (packageJson[depType]) {
try {
for (const [key, val] of Object.entries(
packageJson[depType] as NpmPackageDependeny
packageJson[depType] as NpmPackageDependency
)) {
const depName = parseDepName(depType, key);
const dep: PackageDependency = {
Expand Down
4 changes: 2 additions & 2 deletions lib/manager/pipenv/artifacts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const config = {
};

const dockerConfig = { ...config, binarySource: BinarySource.Docker };
const lockMaintenceConfig = { ...config, isLockFileMaintenance: true };
const lockMaintenanceConfig = { ...config, isLockFileMaintenance: true };

describe('.updateArtifacts()', () => {
let pipFileLock;
Expand Down Expand Up @@ -148,7 +148,7 @@ describe('.updateArtifacts()', () => {
packageFileName: 'Pipfile',
updatedDeps: [],
newPackageFileContent: '{}',
config: lockMaintenceConfig,
config: lockMaintenanceConfig,
})
).not.toBeNull();
expect(execSnapshots).toMatchSnapshot();
Expand Down
2 changes: 1 addition & 1 deletion lib/manager/poetry/__snapshots__/artifacts.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Array [
]
`;

exports[`.updateArtifacts() returns updated poetry.lock using docker (constaints) 1`] = `
exports[`.updateArtifacts() returns updated poetry.lock using docker (constraints) 1`] = `
Array [
Object {
"cmd": "docker pull renovate/python:2.7.5",
Expand Down
2 changes: 1 addition & 1 deletion lib/manager/poetry/artifacts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ describe('.updateArtifacts()', () => {
).not.toBeNull();
expect(execSnapshots).toMatchSnapshot();
});
it('returns updated poetry.lock using docker (constaints)', async () => {
it('returns updated poetry.lock using docker (constraints)', async () => {
jest.spyOn(docker, 'removeDanglingContainers').mockResolvedValueOnce();
await setExecConfig({
...config,
Expand Down
2 changes: 1 addition & 1 deletion lib/manager/regex/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,6 @@ The above (obviously not a complete `Dockerfile`, but abbreviated for this examp
}
```

In the above the `versioningTemplate` is not actually necessary because Renovate already defaults to `semver` versioning, but it has been included to help illustrate why we call these fields _templates_. They are named this way because they are compiled using `handlebars` and so can be composed from values you collect in named capture groups. You will usually want to use the tripe brace `{{{ }}}` template (e.v. `{{{versioniong}}}` to be safe because `handlebars` escapes special characters by default with double braces.
In the above the `versioningTemplate` is not actually necessary because Renovate already defaults to `semver` versioning, but it has been included to help illustrate why we call these fields _templates_. They are named this way because they are compiled using `handlebars` and so can be composed from values you collect in named capture groups. You will usually want to use the tripe brace `{{{ }}}` template (e.v. `{{{versioning}}}` to be safe because `handlebars` escapes special characters by default with double braces.

By adding the comments to the `Dockerfile`, you can see that instead of four separate `regexManagers` being required, there is now only one - and the `Dockerfile` itself is now somewhat better documented too. The syntax we used there is completely arbitrary and you may choose your own instead if you prefer - just be sure to update your `matchStrings` regex.
12 changes: 6 additions & 6 deletions lib/platform/azure/azure-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ async function streamToString(stream: NodeJS.ReadableStream): Promise<string> {
return p;
}

// if no branchName, look globaly
// if no branchName, look globally
export async function getFile(
repoId: string,
filePath: string,
Expand Down Expand Up @@ -157,17 +157,17 @@ export function getProjectAndRepo(
str: string
): { project: string; repo: string } {
logger.trace(`getProjectAndRepo(${str})`);
const strSplited = str.split(`/`);
if (strSplited.length === 1) {
const strSplit = str.split(`/`);
if (strSplit.length === 1) {
return {
project: str,
repo: str,
};
}
if (strSplited.length === 2) {
if (strSplit.length === 2) {
return {
project: strSplited[0],
repo: strSplited[1],
project: strSplit[0],
repo: strSplit[1],
};
}
const msg = `${str} can be only structured this way : 'repository' or 'projectName/repository'!`;
Expand Down
Loading