kinsondigital / kd_clients Goto Github PK
View Code? Open in Web Editor NEWVarious HTTP clients for miscellaneous use.
Home Page: https://deno.land/x/kd_clients
License: MIT License
Various HTTP clients for miscellaneous use.
Home Page: https://deno.land/x/kd_clients
License: MIT License
Improve the release workflow by automatically creating a GitHub release.
No response
No response
Change Type | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
Migrate the project to JSR.
Follow the docs to properly convert imports and configuration of the project so it is compatible with JSR.
This will also involve dealing with any slow types as well as doc generation.
No response
No response
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 | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
Add a function named downloadAllLatestReleaseAssets
to the ReleaseClient
.
This will work just like the downloadAllAssetsByReleaseName
and downloadAllAssetsByReleaseTag
functions except that they will download all the assets for the latest release.
No response
No response
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 | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
Currently, a lot of the GitHub clients do not specifically catch an authentication HTTP status code of 403 or something similar.
Fix this by going through each GitHub client to properly check for this error, and throwing a proper authentication error. The error to throw should be a custom authentication error named AuthError
. The error should have the default message inherited from Error
, but also have a property named InnerErrorMessage
, which represents the original error from the API.
Note
Refer to the GitHub REST API docs to get info about authentication error results.
Example:
A good example of this is the RepoClient.getVariables()
function. This function makes the HTTP REST API call, but it only checks if the returned status code is not equal to OK, and that is it. This means if an authentication error is returned, it will still return the same non-informative error and the user will not know that it is an authentication error.
kd_clients/GitHubClients/RepoClient.ts
Lines 178 to 197 in a8face4
No response
No response
Change Type | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
After using any of the download asset functions in the ReleaseClient
, any subsequent calls to get assets throw an incorrect media type error.
This is because the download asset functions use the application/octet-stream
for the content type but never change the header back to the way it was before updating it. This leaves the octet media type header in place for other requests that require a different media type.
In the download functions, get the current media type before setting the content header to octet-stream, and then set the value back to the value before it was changed.
Important
Make sure to do this in other areas of the logic, such as try-catch blocks and error-processing blocks.
No response
No response
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 | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
Check various dependencies and update them
No response
No response
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 | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
Add the ability to do the following with folders and files in the RepoClient
.
import { Guards, Utils } from "../../deps.ts";
import { RepoClient } from "../../deps.ts";
import { FileOrFolder } from "../../deps.ts";
export class RepoFileService {
private readonly fileRegex: RegExp;
private readonly orgName: string;
private readonly repoName: string;
private readonly token: string;
private readonly repoClient: RepoClient;
constructor(orgName: string, repoName: string, token: string) {
Guards.isNothing(orgName);
Guards.isNothing(repoName);
Guards.isNothing(token);
this.fileRegex = /^.+\..+$/gm;
this.orgName = orgName;
this.repoName = repoName;
this.token = token;
this.repoClient = new RepoClient(orgName, repoName, token);
}
public async folderExists(folderPath: string): Promise<boolean> {
Guards.isNothing(folderPath);
// Strip leading and trailing slashes
folderPath = folderPath.startsWith("/") ? folderPath.substring(1) : folderPath;
folderPath = folderPath.endsWith("/") ? folderPath.substring(0, folderPath.length - 1) : folderPath;
let parentFolder = "";
if (this.fileRegex.test(folderPath)) {
Utils.printGitHubError(`The file name '${folderPath}' is not a valid folder path.`);
Deno.exit(1);
}
if (folderPath.includes("/")) {
const parts = folderPath.split("/");
parentFolder = parts.slice(0, parts.length - 1).join("/");
}
const filesAndFolders = await this.getFilesAndFolders(parentFolder);
return filesAndFolders.some(f => this.isDir(f.type) && f.name === folderPath);
}
public async fileExists(filePath: string) : Promise<boolean> {
Guards.isNothing(filePath);
filePath = filePath.trim();
let folderName = "";
let fileName = "";
if (filePath.includes("/")) {
const parts = filePath.split("/");
fileName = parts[parts.length - 1];
if (!this.fileRegex.test(fileName)) {
Utils.printGitHubError(`The file name '${fileName}' is not a valid file name.`);
Deno.exit(1);
}
folderName = parts.slice(0, parts.length - 1).join("/");
} else {
if (!this.fileRegex.test(fileName)) {
Utils.printGitHubError(`The file name '${fileName}' is not a valid file name.`);
Deno.exit(1);
}
fileName = filePath;
}
const filesAndFolders = await this.getFilesAndFolders(folderName);
return filesAndFolders.some(f => this.isFile(f.type) && f.name === fileName);
}
private async getFilesAndFolders(relativePath: string): Promise<FileOrFolder[]> {
// Guards.isNothing(relativePath);
const baseUrl = "https://api.github.com";
const url = `${baseUrl}/repos/KinsonDigital/Velaptor/contents/${relativePath}`;
const result = await fetch(url, {
method: "GET",
headers: {
"Authorization": `Bearer ${this.token}`,
"Accept": "application/vnd.github+json",
"X-Github-Api-Version": "2022-11-28"
},
});
if (result.status != 200) {
console.error(result.statusText);
Deno.exit(1);
}
const data = await result.json() as FileOrFolder[];
return data;
}
private isFile(type: string): type is "file" {
return type === "file";
}
private isDir(type: string): type is "dir" {
return type === "dir";
}
}
No response
No response
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 | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
Add a new function to the release client to allow the updating of a GitHub release body.
No response
No response
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 | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
In the release workflow, the script URL for sending a release tweet is not fully formed and missing the script file name/relative path.
Fix this and improve pathing in the entire workflow.
No response
No response
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 | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
Currently, the XClient
is using the [email protected]
npm package internally. This is causing issues when it comes npm package support in some systems such as with supabase edge functions.
To solve this issue, replace the npm package with a deno compatible version that can do the same thing as the npm package, or create a custom implementation.
No response
No response
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 | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
Go through all GitHub clients and add checks for the HTTP 401 Unauthorized status code if it does not exist.
If this status code exists, throw an AuthError
with the correct message.
No response
No response
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 | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
This repository currently has no open or pending branches.
.github/workflows/build-status-check.yml
actions/checkout v4
denoland/setup-deno v1
.github/workflows/lint-status-check.yml
actions/checkout v4
denoland/setup-deno v1
.github/workflows/prepare-release.yml
KinsonDigital/Infrastructure v13.6.3
.github/workflows/release.yml
denoland/setup-deno v1
actions/checkout v4
denoland/setup-deno v1
actions/checkout v4
denoland/setup-deno v1
actions/checkout v4
softprops/action-gh-release v2
.github/workflows/sync-bot.yml
denoland/setup-deno v1
.github/workflows/sync-pr-to-issue.yml
KinsonDigital/Infrastructure v13.6.3
KinsonDigital/Infrastructure v13.6.3
.github/workflows/sync-status-check.yml
denoland/setup-deno v1
.github/workflows/test-status-check.yml
actions/checkout v4
denoland/setup-deno v1
Add some functions to the ReleaseClient
to delete and upload assets from a release.
Delete single asset:
is set to
true`Upload single asset functions:
overwrite
param is set to true
overwrite
param is set to true
Asset Exists:
No response
No response
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 | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
Create a workflow that helps prepare the release by creating the release notes and updating the version. Use the prepare release workflow from the Velaptor repository as a starting point.
The updating of the version will have to be done differently than in Velaptor. It exists in the deno.json. Currently the PrepareReleaseRunner in the Infrastructure repository needs to be updated to pull versions from deno files before this can be implemented.
Also, update the applicable workflows that use the pull_request_target
trigger to use the preview branch in addition to the main branch.
With the creation of a preview branch, the release workflow will probably need to be updated.
Note
This is going to require this project to start using preview branches.
No response
Change Type | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
Add a new function to the ReleaseClient
to get all of the releases as an array.
Reason:
Some users are saying that they need to get all of the releases so they can perform their own filtering or processing of the releases. Currently, the only function available is the public function named getReleases()
, but this takes the page
and qtyPerPage
parameters. This forces the user to implement their own pagination code to get all of the releases. This is not good DX..
Add a new function named getAllReleases()
which will simply get all of the releases as an array.
No response
No response
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 | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
Make improvements to the CLI
class to better handle directory and file paths as well as make use of the Deno.execPath()
API.
CLI Class Code:
/**
* A simple CLI command wrapper.
*/
export class CLI {
/**
* Runs the following CLI {@link command}.
* @param command The command to run.
* @returns The output of the command if successful, otherwise an error.
*/
public async runAsync(command: string): Promise<string | Error> {
if (command === undefined || command === null || command === "") {
const errorMsg = "The command parameter cannot be null or empty.";
console.log(errorMsg);
Deno.exit(1);
}
command = command.includes("'")
? command.replace(/'/g, '"')
: command;
const sections: string[] = command.match(/(?:[^\s"']+|"[^"]*"|'[^']*')+/g) ?? [];
const app = sections[0] === "deno" ? Deno.execPath() : sections[0];
const args = sections.slice(1).map(arg => arg.replace(/"/g, ''));
const cmd = new Deno.Command(app, { args: args });
const { code, stdout, stderr } = await cmd.output();
if (code === 0) {
return new TextDecoder().decode(stdout);
} else {
return new Error(new TextDecoder().decode(stderr));
}
}
}
Directory.getFiles() Function
/**
* Gets a list of files in the given {@link dirPath}. This will search recursively
* if {@link recursive} is true.
* @param dirPath The path of the directory start searching.
* @param extension The file extension to search for.
* @param recursive True to search recursively, otherwise false.
* @returns {string[]} A list of files in the given {@link dirPath}.
*/
public static getFiles(dirPath: string, extension:string, recursive = false): string[] {
let files: string[] = [];
extension = extension.trim();
const extensionRegex = /\.[a-zA-Z]/g;
extension = Utils.isNothing(extension) ? "*.*" : extension;
if (extension != "*.*") {
extension = extension.startsWith("*.") ? extension.substring(1) : extension;
if (!extension.startsWith(".") || extension.length === 1) {
const errorMsg = `The extension '${extension}' is not supported.\n` +
`Must be a value of '*.*' or '*.<extension>'.`;
console.log(errorMsg);
throw new Error(errorMsg);
}
}
if (dirPath === undefined || dirPath === null || dirPath === "") {
const errorMsg = "The dirPath parameter cannot be null or empty.";
console.log(errorMsg);
Deno.exit(1);
}
dirPath = dirPath === "." || dirPath === "./" ? Deno.cwd() : dirPath;
for (const dirEntry of Deno.readDirSync(dirPath)) {
const entry = dirPath + "/" + dirEntry.name;
if (recursive && dirEntry.isDirectory) {
files = [...files, ...(Directory.getFiles(entry, extension, recursive))];
} else if (dirEntry.isFile) {
if (extension === "*.*") {
files.push(entry);
} else {
if (entry.endsWith(extension)) {
files.push(entry);
}
}
}
}
return files;
}
Adjust deno-check.ts Script:
const files: string[] = Directory
- .getFiles("/", ".ts", true)
+ .getFiles("./", ".ts", true)
.filter(f => ignoreDirectories.every(ignoreDir => !f.startsWith(ignoreDir)));
Change Type | Label |
---|---|
CICD | https://github.com/KinsonDigital/VelaptorDocs/labels/%E2%99%BB%EF%B8%8Fcicd |
Dependency Update | https://github.com/KinsonDigital/VelaptorDocs/labels/%F0%9F%93%A6dependency%20update |
Miscellaneous | https://github.com/KinsonDigital/VelaptorDocs/labels/miscellaneous |
Tutorial Doc Changes | https://github.com/KinsonDigital/VelaptorDocs/labels/%F0%9F%93%9Ctutorial%20doc%20changes |
Priority Type | Label |
---|---|
Low Priority | https://github.com/KinsonDigital/VelaptorDocs/labels/low%20priority |
Medium Priority | https://github.com/KinsonDigital/VelaptorDocs/labels/medium%20priority |
High Priority | https://github.com/KinsonDigital/VelaptorDocs/labels/high%20priority |
Fix an issue with the release workflow with a missing argument to the close milestone script.
This is on line #158 in the release.yml workflow. The organization name is missing as the first argument.
No response
No response
Change Type | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
When creating a new OrgClient
object, an error is thrown that the repoName
is null, undefined, or empty when it is not.
error: Uncaught Error: The value is null, undefined, or empty.
Function Name: repoName
Param Name: v
throw new Error(errorMsg);
^
at Function.isNothing (https://deno.land/x/[email protected]/core/Guard.ts:28:10)
at OrgClient.set repoName (https://deno.land/x/[email protected]/core/GitHubClient.ts:64:9)
at new GitHubClient (https://deno.land/x/[email protected]/core/GitHubClient.ts:27:16)
at new OrgClient (https://deno.land/x/[email protected]/GitHubClients/OrgClient.ts:23:3)
at AddItemToProjectRunner.validateArgs (file:///K:/SOFTWARE-DEV/PERSONAL/Infrastructure/cicd/scripts/runners/AddItemToProjectRunner.ts:78:21)
at AddItemToProjectRunner.run (file:///K:/SOFTWARE-DEV/PERSONAL/Infrastructure/cicd/scripts/runners/ScriptRunner.ts:63:14)
at AddItemToProjectRunner.run (file:///K:/SOFTWARE-DEV/PERSONAL/Infrastructure/cicd/scripts/runners/AddItemToProjectRunner.ts:35:15)
at file:///K:/SOFTWARE-DEV/PERSONAL/Infrastructure/cicd/scripts/add-item-to-project.ts:4:32
After digging into the issue, the org client is sending in an empty string literal into the super()
call which is type GitHubClient
. In the GitHubClient
class, the constructor contains a guard that checks if the repoName
argument is null and throws an error when it is. Which in this case it always is.
Just send in the value na
to fix this issue.
No response
No response
Change Type | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
With various functions in the IssueClient
, add an options
parameter to functions where using options would make sense to use.
A good example would be the getIssues()
function. The following params could be added to an options param instead.
state
labels
milestoneNumber
No response
No response
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 | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
Install and set up KDAdmin
Use this command to install KDAdmin:
deno run -Ar https://raw.githubusercontent.com/KinsonDigital/kd-admin/preview/installation/install.ts latest
Note
If the create-pr.ps1
file already exists, the tool will skip the file.
If this happens, set the content of the file to the content below:
& "dev-tools/bin/kd-admin" create-pr;
No response
No response
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 | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
This is the initial creation of the project. Everything from code, config, ide settings, deno settings, etc.
The release workflow needs to be able to run linting, run tests, and then create an empty commit with a tag that is the version number. This number should be chosen when manually running the release workflow. All validation of inputs should be performed.
Create new prepare release templates based on the ones that already exist in infrastructure.
Create these templates in this repo, not in the Infrastructure repo.
This will require the use of the following repo variables:
Note
This variable will hold the name of the repo where the templates exist
Note
This uses the newdeno-check.ts
script
No response
No response
Change Type | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
Create a default mod.ts module for the models in the Models
and Models/GraphQlModels
directories.
The GraphQL modules should be also imported into the Models
folder and reexported. This will give the option to the user to point to the Models
mod.ts module and get every single model or to reference the mod.ts module for the GraphQL modules only.
Models/GraphQlModels
directoryModels
directory
Models/GraphQlModels
mod.ts imported into theNo response
No response
Change Type | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
Fix a bug where updating a repo file using the RepoClient.updateFile()
function throws an error when the file that is trying to be updated already exists.
Expected Behavior:
The error should only be thrown if the file does not exist.
No response
No response
Change Type | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
Add a new function to the ReleaseClient
that takes a release id or name and an asset name parameter and returns a result indicating whether the asset exists in the release.
Add the following function signature:
public async assetExists(releaseIdOrName: number | string, assetName: string): Promise<boolean>;
This function will dynamically check if the release is an id number
or name string
and then use the asset name to check if the asset exists.
No response
No response
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 | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
Change the token
parameter in the OrgClient
constructor from optional to required.
No response
No response
Change Type | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
Update the release client to give the ability to upload assets to an existing release.
Should have the following capabilities:
No response
No response
Change Type | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
Update all of the code check steps to all execute even if they fail. Failure will be performed in another new step that will analyze the results of the code check steps. If any of them fail, then the whole workflow will failed.
Reason:
This is to allow runs to know if any of the other code checks have failed even if one code check has failed.
The code check steps to update are:
These steps will be changed to use the continue-on-error: true
setting so that way they do not fail the workflow if the check fails.
Refactorings:
Run Build
step to Deno Check
Run Lint
step to Deno Lint
Things to add:
Deno Format
deno fmt --check
continue-on-error: true
settingValidate Checks
that will check all of the previous code check steps to see if they have failed. If any of them has failed, the entire workflow will fail.
No response
No response
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 | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
Create a type for the different states for the IssueModel
and PullRequestModel
interfaces.
The different states are:
open
closed
No response
No response
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 | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
Improve the pull request client by updating the function to request reviewers for a pull request. Currently, the function only requests a single reviewer at a time. This is not ideal in situations where you have multiple reviewers to assign because you would need to use a loop to perform a request for each reviewer.
The GitHub REST API endpoint has the ability to send multiple reviewers, but the function/client is simply not taking advantage of it.
What to do:
requestReviewer
function to requestReviewers
requestReviewer
parameter named reviewer
to the name reviewers
reviewer
parameter type from string
to string | string[]
.
Note
This will internally always send an array. This is just to make it easy for the user
Note
The name of the class to make these changes is PullRequestClient
Warning
This introduces https://github.com/KinsonDigital/kd_clients/labels/%F0%9F%A7%A8breaking%20changes
No response
No response
Change Type | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
Fix an issue with the NuGetClient
checking if a NuGet package exists for a specific version.
The issue exists packageWithVersionExists()
function. The client needs to setup a default **Accept** header with a value of json
.
No response
No response
Change Type | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
Currently, the project is using the [email protected]
npm package.
Replace this package with a deno equivalent, or with a custom implementation.
When checking for a deno equivalent, check the project source code to make sure that it is not using any npm packages itself as a dependency.
No response
No response
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 | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
Fix all of the mod.ts files in the project to use relative paths instead of the import maps.
This is causing issues when consuming the library as a user.
Also, replace all of the uses of Deno.exit(1)
in the clients and other areas with proper replacement code.
Deno.exit(1)
usesGitHubClient
ctor params with the names ownerName
and repoName
required!==
with !=
Utils.ts
No response
No response
Change Type | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
Add methods to the ReleaseClient
to be able to download release assets.
No response
No response
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 | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
Convert all of the model types to interfaces.
No response
No response
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 | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
Add some options to the getVariables()
function in the RepoClient
and OrgClient
class. These options will be used to signify how to trim the variable values.
Add the following options:
\n
, and \r
characters from the beginning and end of the variable values.Each option should be available and performed using an enum. The different enum values will represent a different trimming behavior.
Here are the trimming behaviors:
Warning
Do not use a standard typescript enum. This has some pitfalls and it is recommended to do something different.
More info about this can be found here
const TrimType = {
TrimNL: "TrimNL",
TrimNLStart: "TrimNLStart",
TrimNLEnd: "TrimNLEnd",
TrimCR: "TrimCR",
TrimCRStart: "TrimCRStart",
TrimCREnd: "TrimCREnd",
TrimNLAndCR: "TrimNLAndCR",
TrimNLAndCRStart: "TrimNLAndCRStart",
TrimNLAndCREnd: "TrimNLAndCREnd",
TrimSpaces: "TrimSpaces",
TrimSpacesStart: "TrimSpacesStart",
TrimSpacesEnd: "TrimSpacesEnd",
TrimAllSpacesAndNLCR: "TrimAllSpacesAndNLCR",
None: "None",
} as const; // This prevents the object from being mutated
type EnumValues<T> = T[keyof T];
type TrimType = EnumValues<typeof TrimType>;
// Use Examples Below
// How to use
function trim(trimType: TrimType) {
console.log(trimType);
}
trim(TrimType.TrimCR);
// OR
trim("TrimCR");
Options Object Type:
type ValueOptions = {
trimming?: TrimType,
casing?: 'lower-case' | 'upper-case',
}
Note
NL = New Line = \n
CR = Carriage Return = \r
No response
No response
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 | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
Rename the following client functions:
MilestoneClient.milestoneExists
to exists
LabelClient.labelExists
to exists
PullRequestClient.pullRequestExists
to exists
PullRequestClient.openPullRequestExists
to openExists
PullRequestClient.closedPullRequestExists
to closedExists
IssueClient.issueExists
to exists
IssueClient.openIssueRequestExists
to openExists
IssueClient.closedIssueRequestExists
to closedExists
ReleaseClient.releaseExists
to exists
RepoClient.repoVariableExists
to variableExists
TagClient.tagExists
to exists
NuGetClient.packageExists
to NuGetClient.packageWithVersionExists
exists
Reason:
This is how the rest
No response
No response
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 | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
Fix a bug that prevents getting a list of issues using the IssueClient.getIssues()
function from working correctly by filtering the issues with a list of labels.
Currently, when getting a list of issues while passing in a list of labels, all issues with any label will be returned. The intended behavior is that if any labels are sent into the function, only labels that contain any of the labels will be returned.
No response
No response
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 | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
Fix a bug where getting repository data using the RepoClient.getRepo()
function only works if the name of the repository is all lowercase.
No response
No response
Change Type | Label |
---|---|
Bug Fixes | 🐛bug |
Breaking Changes | 🧨breaking changes |
New Feature | ✨new feature |
CICD Changes | ♻️cicd |
Config Changes | ⚙️config |
Performance Improvements | 🏎️performance |
Code Doc Changes | 🗒️documentation/code |
Product Doc Changes | 📝documentation/product |
Priority Type | Label |
---|---|
Low Priority | low priority |
Medium Priority | medium priority |
High Priority | high priority |
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.