Skip to content

Commit

Permalink
chore: hide non-ubiquibot tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
Keyrxng committed Aug 19, 2024
1 parent ee9da9f commit e4b4c9e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@
"@commitlint/config-conventional"
]
}
}
}
17 changes: 11 additions & 6 deletions src/home/rendering/render-github-issues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@ export function renderGitHubIssues(tasks: TaskMaybeFull[]) {

let delay = 0;
const baseDelay = 1000 / 15; // Base delay in milliseconds

for (const task of tasks) {
const isBot = task.preview.user?.type === "Bot"
const userId = task.preview.user?.id

if (isBot && userId !== 113181824) {
continue;
}

if (!existingIssueIds.has(task.preview.id.toString())) {
const issueWrapper = everyNewIssue({ taskPreview: task, container });
if (issueWrapper) {
Expand Down Expand Up @@ -75,11 +81,10 @@ function setUpIssueElement(
const image = `<img />`;

issueElement.innerHTML = `
<div class="info"><div class="title"><h3>${
task.preview.title
}</h3></div><div class="partner"><p class="organization-name">${organizationName}</p><p class="repository-name">${repositoryName}</p></div></div><div class="labels">${labels.join(
""
)}${image}</div>`;
<div class="info"><div class="title"><h3>${task.preview.title
}</h3></div><div class="partner"><p class="organization-name">${organizationName}</p><p class="repository-name">${repositoryName}</p></div></div><div class="labels">${labels.join(
""
)}${image}</div>`;

issueElement.addEventListener("click", () => {
try {
Expand Down
1 change: 0 additions & 1 deletion static/style/inverted-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,6 @@
align-items: center;
display: inline-flex;
text-align: left;
margin: 0 16px;
}
#authenticated > * {
display: inline-flex;
Expand Down

0 comments on commit e4b4c9e

Please sign in to comment.