Skip to content

Commit

Permalink
Update github personal access token
Browse files Browse the repository at this point in the history
  • Loading branch information
MathyouMB committed Jul 28, 2024
1 parent ebe9ef9 commit 7347e24
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ npm install -g dotenv-cli

```
DISCORD_CHANNEL_WEBHOOK_URL=YOUR_WEBHOOK_URL_HERE
GITHUB_ACCESS_TOKEN=(ask Matthew for this)
```

7. Start the job:
Expand Down
7 changes: 4 additions & 3 deletions src/github/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import axios from "axios";
import { Ok, Err, Result } from "ts-results";
import dotenv from "dotenv";
import { PROJECT_V2_ITEMS } from "./graphql";

dotenv.config();

// TODO: improve this
export interface ProjectV2Item {
id: string;
Expand Down Expand Up @@ -44,9 +47,7 @@ export const fetchProjectV2Items = async (): Promise<
return Ok(result.val.data.organization.projectV2.items.nodes);
};

// TODO: move to .env (it's fine for now because it only has read access)
const TOKEN =
"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";
const TOKEN = process.env.GITHUB_ACCESS_TOKEN ?? "";

const fetchData = async (): Promise<Result<any, Error>> => {
try {
Expand Down

0 comments on commit 7347e24

Please sign in to comment.