Skip to content

Commit

Permalink
FIX Init array and use $oldName
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Jan 28, 2024
1 parent f2a67c6 commit 6609d4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion labels_command.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,10 @@
} else {
github_api($url, ['new_name' => $newName], 'PATCH');
}
$oldName = $name;
$name = $newName;
// Update $url replacing the $name at the end with $newName
$url = substr($url, 0, strlen($url) - strlen($name)) . $newName;
$url = substr($url, 0, strlen($url) - strlen($oldName)) . $newName;
$labels[$key]['name'] = $newName;
$labels[$key]['url'] = $url;
}
Expand Down
1 change: 1 addition & 0 deletions run.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
$MODULE_DIR = '';
$PRS_CREATED = [];
$REPOS_WITH_PRS_CREATED = [];
$REPOS_WITH_LABELS_UPDATED = [];
$OUT = null;

// options
Expand Down

0 comments on commit 6609d4c

Please sign in to comment.