Skip to content

Commit

Permalink
refactor: replace deprecated String.prototype.substr() (#38)
Browse files Browse the repository at this point in the history
.substr() is deprecated so we replace it with .substring() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <[email protected]>
  • Loading branch information
CommanderRoot authored May 14, 2022
1 parent 772f647 commit 93b20df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function getIssueBody() {
}
function regexifyConfigPath(configPath, version) {
var lastIndex = configPath.lastIndexOf('.');
return `${configPath.substr(0, lastIndex)}-v${version}.yml`;
return `${configPath.substring(0, lastIndex)}-v${version}.yml`;
}
function getLabelRegexes(client, configurationPath) {
return __awaiter(this, void 0, void 0, function* () {
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function getIssueBody(): string | undefined {

function regexifyConfigPath(configPath: string, version: string) {
var lastIndex = configPath.lastIndexOf('.')
return `${configPath.substr(0, lastIndex)}-v${version}.yml`
return `${configPath.substring(0, lastIndex)}-v${version}.yml`
}

async function getLabelRegexes(
Expand Down

0 comments on commit 93b20df

Please sign in to comment.