Skip to content

Commit

Permalink
Feature: add the ability for a user to amend a commit
Browse files Browse the repository at this point in the history
Details in #15

Signed-off-by: Brent Salisbury <bsalisbu@redhat.com>
  • Loading branch information
nerdalert committed Jun 22, 2024
1 parent a6d423f commit 0b37b19
Show file tree
Hide file tree
Showing 8 changed files with 1,409 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/app/api/pr/knowledge/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export async function POST(req: NextRequest) {
const forkExists = await checkUserForkExists(headers, githubUsername);
if (!forkExists) {
await createFork(headers);
// Add a delay to ensure the fork operation completes to avoid a race condition when retrieving the bas SHA
// Add a delay to ensure the fork operation completes to avoid a race condition when retrieving the base SHA
// This only occurs if this is the first time submitting and the fork isn't present.
// TODO change to a retry
console.log('Pause 5s for the forking operation to complete');
Expand Down Expand Up @@ -301,7 +301,7 @@ async function createPullRequest(headers: HeadersInit, username: string, branchN
method: 'POST',
headers,
body: JSON.stringify({
title: `Add knowledge: ${knowledgeName}`,
title: `Knowledge: ${knowledgeName}`,
head: `${username}:${branchName}`,
base: BASE_BRANCH
})
Expand Down
2 changes: 1 addition & 1 deletion src/app/api/pr/skill/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ async function createPullRequest(headers: HeadersInit, username: string, branchN
method: 'POST',
headers,
body: JSON.stringify({
title: `Add skill: ${skillName}`,
title: `Skill: ${skillName}`,
head: `${username}:${branchName}`,
base: BASE_BRANCH
})
Expand Down
13 changes: 8 additions & 5 deletions src/app/dashboard/page.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
// src/app/jobs/dashboard/page.tsx
// src/app/page.tsx
'use client';

import * as React from 'react';
import { AppLayout } from '../../components/AppLayout';
import { Index } from '../../components/Dashboard';
import '@patternfly/react-core/dist/styles/base.css';
import { AppLayout } from '@/components/AppLayout';
import { Index } from '@/components/Dashboard';

const DashboardPage: React.FC = () => {
const Home: React.FunctionComponent = () => {
return (
<AppLayout>
<Index />
</AppLayout>
);
};

export default DashboardPage;
export default Home;
Loading

0 comments on commit 0b37b19

Please sign in to comment.