🚧Refactor function parameter names #84
Labels
🧨breaking-changes
Feature/changes contains breaking changes
low-priority
Low Priority
preview
Done while in preview
tech-debt
Code refactoring or cleanup / tech debt reduction
Milestone
Complete The Item Below
Description
Refactor parameter names for various functions in the
RepoClient
class and sanitize incoming relative file paths:This is to make the meaning of the parameters more clear, which in turn improves the API.
Do the following:
branchName
parameter toref
for the following functions in theRepoClient
:getFileContent
fileExists
getFileContentInternal
Sanitize therelativeFilePath
parameters by trimming any.
,/
,\
, and~
characters from the beginning of the paths.This ensures that using these common characters for paths does not cause issues with the URL's construction during the concatenation of the URL and the relative file path. Also, make sure that the URL's
owner/repo/contents
section and the relative file path are separated by a/
character.Remove the check of absolute file paths from the functions. Refer to the check below.Acceptance Criteria
The items to complete to satisfy the Definition of Done.
ToDo Items
The items to complete to satisfy the Definition of Done.
Issue Dependencies
No response
Related Work
No response
Additional Information:
Unit Tests
Reasons for local unit test execution:
💡Warning💡
If the unit tests pass remotely and are not executed locally, this means we could be letting a bug slip into production.
Though bugs will always exist in some capacity, we should all do our part to help prevent them from happening.
Change Type Labels
🐛bug
🧨breaking-changes
✨new-feature
♻️cicd
⚙️config
🏎️performance
🗒️documentation/code
📝documentation/product
Priority Type Labels
low priority
medium priority
high priority
Code of Conduct
The text was updated successfully, but these errors were encountered: