Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Commit

Permalink
chore: debug validation error
Browse files Browse the repository at this point in the history
  • Loading branch information
0x4007 committed Dec 8, 2023
1 parent 3bdad28 commit e984244
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 68 deletions.
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env sh
. "$(dirname "$0")/_/husky.sh"

# Run lint-staged first
Expand Down
11 changes: 6 additions & 5 deletions src/handlers/comment/handlers/assign/assign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,12 @@ export async function assign(context: Context, body: string) {
// double check whether the assign message has been already posted or not
logger.info("Creating an issue comment", { comment });

const {
multiplierAmount: multiplierAmount,
multiplierReason: multiplierReason,
totalPriceOfTask: totalPriceOfTask,
} = await getMultiplierInfoToDisplay(context, payload.sender.id, payload.repository.id, issue);
const { multiplierAmount, multiplierReason, totalPriceOfTask } = await getMultiplierInfoToDisplay(
context,
payload.sender.id,
payload.repository.id,
issue
);
return [
assignTableComment({
multiplierAmount,
Expand Down
124 changes: 62 additions & 62 deletions src/types/payload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export enum GitHubEvent {
export enum UserType {
User = "User",
Bot = "Bot",
// Organization = "Organization",
Organization = "Organization",
}

export enum IssueType {
Expand Down Expand Up @@ -140,82 +140,82 @@ const issueSchema = Type.Object({
export type Issue = Static<typeof issueSchema>;

const repositorySchema = Type.Object({
id: Type.Number(),
node_id: Type.String(),
name: Type.String(),
full_name: Type.String(),
private: Type.Boolean(),
owner: userSchema,
html_url: Type.String(),
allow_forking: Type.Boolean(),
archive_url: Type.String(),
archived: Type.Boolean(),
assignees_url: Type.String(),
blobs_url: Type.String(),
branches_url: Type.String(),
clone_url: Type.String(),
collaborators_url: Type.String(),
comments_url: Type.String(),
commits_url: Type.String(),
compare_url: Type.String(),
contents_url: Type.String(),
contributors_url: Type.String(),
created_at: Type.String({ format: "date-time" }),
default_branch: Type.String(),
deployments_url: Type.String(),
description: Type.Union([Type.String(), Type.Null()]),
disabled: Type.Boolean(),
downloads_url: Type.String(),
events_url: Type.String(),
fork: Type.Boolean(),
url: Type.String(),
forks_count: Type.Number(),
forks_url: Type.String(),
keys_url: Type.String(),
collaborators_url: Type.String(),
teams_url: Type.String(),
forks: Type.Number(),
full_name: Type.String(),
git_commits_url: Type.String(),
git_refs_url: Type.String(),
git_tags_url: Type.String(),
git_url: Type.String(),
has_downloads: Type.Boolean(),
has_issues: Type.Boolean(),
has_pages: Type.Boolean(),
has_projects: Type.Boolean(),
has_wiki: Type.Boolean(),
hooks_url: Type.String(),
html_url: Type.String(),
id: Type.Number(),
is_template: Type.Boolean(),
issue_comment_url: Type.String(),
issue_events_url: Type.String(),
events_url: Type.String(),
assignees_url: Type.String(),
branches_url: Type.String(),
tags_url: Type.String(),
blobs_url: Type.String(),
git_tags_url: Type.String(),
git_refs_url: Type.String(),
trees_url: Type.String(),
statuses_url: Type.String(),
issues_url: Type.String(),
keys_url: Type.String(),
labels_url: Type.String(),
language: Type.Any(),
languages_url: Type.String(),
stargazers_url: Type.String(),
contributors_url: Type.String(),
subscribers_url: Type.String(),
subscription_url: Type.String(),
commits_url: Type.String(),
git_commits_url: Type.String(),
comments_url: Type.String(),
issue_comment_url: Type.String(),
contents_url: Type.String(),
compare_url: Type.String(),
license: Type.Any(),
merges_url: Type.String(),
archive_url: Type.String(),
downloads_url: Type.String(),
issues_url: Type.String(),
pulls_url: Type.String(),
milestones_url: Type.String(),
name: Type.String(),
node_id: Type.String(),
notifications_url: Type.String(),
labels_url: Type.String(),
releases_url: Type.String(),
deployments_url: Type.String(),
created_at: Type.String({ format: "date-time" }),
updated_at: Type.String({ format: "date-time" }),
open_issues_count: Type.Number(),
open_issues: Type.Number(),
owner: userSchema,
private: Type.Boolean(),
pulls_url: Type.String(),
pushed_at: Type.String({ format: "date-time" }),
git_url: Type.String(),
ssh_url: Type.String(),
clone_url: Type.String(),
svn_url: Type.String(),
releases_url: Type.String(),
size: Type.Number(),
ssh_url: Type.String(),
stargazers_count: Type.Number(),
watchers_count: Type.Number(),
language: Type.Any(),
has_issues: Type.Boolean(),
has_projects: Type.Boolean(),
has_downloads: Type.Boolean(),
has_wiki: Type.Boolean(),
has_pages: Type.Boolean(),
forks_count: Type.Number(),
archived: Type.Boolean(),
disabled: Type.Boolean(),
open_issues_count: Type.Number(),
license: Type.Any(),
allow_forking: Type.Boolean(),
is_template: Type.Boolean(),
web_commit_signoff_required: Type.Boolean(),
stargazers_url: Type.String(),
statuses_url: Type.String(),
subscribers_url: Type.String(),
subscription_url: Type.String(),
svn_url: Type.String(),
tags_url: Type.String(),
teams_url: Type.String(),
topics: Type.Array(Type.Any()),
trees_url: Type.String(),
updated_at: Type.String({ format: "date-time" }),
url: Type.String(),
visibility: Type.String(),
forks: Type.Number(),
open_issues: Type.Number(),
watchers_count: Type.Number(),
watchers: Type.Number(),
default_branch: Type.String(),
web_commit_signoff_required: Type.Boolean(),
});

export type Repository = Static<typeof repositorySchema>;
Expand Down

0 comments on commit e984244

Please sign in to comment.