Skip to content

Commit

Permalink
🚧Fix getting repo data bug (#29)
Browse files Browse the repository at this point in the history
* Start work for issue #28

* fix: change how repo name comparison works

* docs: update release notes for release v1.0.0-preview.6

* release: update version from v1.0.0-preview.6 to v1.0.0-preview.7

* release: create release notes for version v1.0.0-preview.7
  • Loading branch information
CalvinWilkinson authored Dec 9, 2023
1 parent 41696f6 commit 867eeee
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 4 deletions.
8 changes: 5 additions & 3 deletions GitHubClients/RepoClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,16 @@ export class RepoClient extends GitHubClient {
1, // Start page
100, // Qty per page
(pageOfData: RepoModel[]) => {
return pageOfData.some((repo) => repo.name.trim().toLowerCase() === this.repoName);
return pageOfData.some((repo) => repo.name.trim() === this.repoName.trim());
},
);

const foundRepo: RepoModel | undefined = foundRepos.find((repo) => repo.name.trim().toLowerCase() === this.repoName);
const foundRepo: RepoModel | undefined = foundRepos.find((repo) => repo.name.trim() === this.repoName.trim());

if (foundRepo === undefined) {
throw new RepoError(`The repository '${this.repoName}' was not found.`);
const errorMsg = `The repository '${this.repoName}' was not found.` +
'\nThe repository name is case sensitive. Make sure to check the name and try again.';
throw new RepoError(errorMsg);
}

return foundRepo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ As with all software, there is always a chance for issues and bugs, especially f
- `updateOrAdd()`
- `clearHeaders()`
- `containsHeader()`
2. [#22](https://github.com/KinsonDigital/Velaptor/issues/22) - Added the ability to upload assets to a GitHub release.
- The new function named `uploadAssets` was added to the `ReleaseClient` class.

<h2 align="center" style="font-weight: bold;">Breaking Changes 🧨</h2>

1. [#22](https://github.com/KinsonDigital/Velaptor/issues/22) - Removed the functions `getReleaseByTag` and `getReleaseByName`.
- These functions were replaced by the function named `getRelease`.
- The `getRelease` function now uses the options parameter named `ReleaseOptions`.
2. [#19](https://github.com/KinsonDigital/Velaptor/issues/19) - Changed the `token` constructor parameter of the `OrgClient` class from optional to required.

<h2 align="center" style="font-weight: bold;">Bug Fixes 🐛</h2>

Expand Down
14 changes: 14 additions & 0 deletions ReleaseNotes/PreviewReleases/Release-Notes-v1.0.0-preview.7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<h1 align="center" style="color: mediumseagreen;font-weight: bold;">
kd_clients Preview Release Notes - v1.0.0-preview.7
</h1>

<h2 align="center" style="font-weight: bold;">Quick Reminder</h2>

<div align="center">

As with all software, there is always a chance for issues and bugs, especially for preview releases, which is why your input is greatly appreciated. 🙏🏼
</div>

<h2 align="center" style="font-weight: bold;">Bug Fixes 🐛</h2>

1. [#28](https://github.com/KinsonDigital/Velaptor/issues/28) - Fixed a bug where getting the repository using the `RepoClient.getRepo()` function only worked with all lowercase repo names.
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v1.0.0-preview.6",
"version": "v1.0.0-preview.7",
"tasks": {
"clear": "deno run -A ./.github/deno-tasks/clear-screen.ts",
"build": "deno task clear && deno run -A ./.github/cicd/scripts/deno-check.ts",
Expand Down

0 comments on commit 867eeee

Please sign in to comment.