Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Jan 15, 2025
1 parent b78ec28 commit 09765a2
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .astro/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
declare module 'astro:env/server' {
export const TOKEN_GITHUB: string;
}
2 changes: 2 additions & 0 deletions .astro/types.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/// <reference types="astro/client" />
/// <reference path="content.d.ts" />
/// <reference path="env.d.ts" />
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Token="Token"
TOKEN_GITHUB="TOKEN_GITHUB"
12 changes: 6 additions & 6 deletions Source/Function/Commit/Layout.astro
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
// import { getSecret, TOKEN_GITHUB } from "astro:env/server";
const { user, repo } = Astro.props;
const Last = await (
await fetch(
`https://api.github.com/repos/${user}/${repo}/commits?per_page=10`,
)
).json();
console.log(Last);
---

<div>
Expand All @@ -18,16 +18,16 @@ console.log(Last);
<thead class="bg-stone-50 text-xs uppercase text-stone-700 dark:bg-stone-700 dark:text-stone-400">
<tr>
<th scope="col" class="px-6 py-3">
Message
COMMIT MESSAGE
</th>
<th scope="col" class="px-6 py-3">
Author
AUTHOR
</th>
<th scope="col" class="px-6 py-3 text-center">
Date
DATE
</th>
<th scope="col" class="px-6 py-3 text-center">
Link
HREF
</th>
</tr>
</thead>
Expand Down

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Target/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ export const On = process.env["NODE_ENV"] === "development";
export default (await import("astro/config")).defineConfig({
env: {
schema: {
Token: envField.string({
TOKEN_GITHUB: envField.string({
context: "server",
access: "secret",
optional: false,
default: "GitHub Token API Stream",
}),
},
validateSecrets: true,
validateSecrets: false,
},
srcDir: "./Source",
publicDir: "./Public",
Expand Down

0 comments on commit 09765a2

Please sign in to comment.