refactor: replace deprecated String.prototype.substr()
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
This commit is contained in:
parent
3886398541
commit
0a713019c3
9 changed files with 9 additions and 9 deletions
2
lib/actions-util.js
generated
2
lib/actions-util.js
generated
|
|
@ -673,7 +673,7 @@ async function isAnalyzingDefaultBranch() {
|
|||
// Get the current ref and trim and refs/heads/ prefix
|
||||
let currentRef = await getRef();
|
||||
currentRef = currentRef.startsWith("refs/heads/")
|
||||
? currentRef.substr("refs/heads/".length)
|
||||
? currentRef.slice("refs/heads/".length)
|
||||
: currentRef;
|
||||
const event = getWorkflowEvent();
|
||||
const defaultBranch = (_a = event === null || event === void 0 ? void 0 : event.repository) === null || _a === void 0 ? void 0 : _a.default_branch;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue