mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-25 08:14:12 +08:00
Compare commits
1 Commits
claude/iss
...
ashwin/tri
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e35c991da9 |
@@ -1,17 +1,17 @@
|
|||||||
import { execSync } from "child_process";
|
import { execSync } from "child_process";
|
||||||
import type { Octokits } from "../api/client";
|
|
||||||
import { ISSUE_QUERY, PR_QUERY } from "../api/queries/github";
|
|
||||||
import type {
|
import type {
|
||||||
|
GitHubPullRequest,
|
||||||
|
GitHubIssue,
|
||||||
GitHubComment,
|
GitHubComment,
|
||||||
GitHubFile,
|
GitHubFile,
|
||||||
GitHubIssue,
|
|
||||||
GitHubPullRequest,
|
|
||||||
GitHubReview,
|
GitHubReview,
|
||||||
IssueQueryResponse,
|
|
||||||
PullRequestQueryResponse,
|
PullRequestQueryResponse,
|
||||||
|
IssueQueryResponse,
|
||||||
} from "../types";
|
} from "../types";
|
||||||
import type { CommentWithImages } from "../utils/image-downloader";
|
import { PR_QUERY, ISSUE_QUERY } from "../api/queries/github";
|
||||||
|
import type { Octokits } from "../api/client";
|
||||||
import { downloadCommentImages } from "../utils/image-downloader";
|
import { downloadCommentImages } from "../utils/image-downloader";
|
||||||
|
import type { CommentWithImages } from "../utils/image-downloader";
|
||||||
|
|
||||||
type FetchDataParams = {
|
type FetchDataParams = {
|
||||||
octokits: Octokits;
|
octokits: Octokits;
|
||||||
@@ -101,14 +101,6 @@ export async function fetchGitHubData({
|
|||||||
let changedFilesWithSHA: GitHubFileWithSHA[] = [];
|
let changedFilesWithSHA: GitHubFileWithSHA[] = [];
|
||||||
if (isPR && changedFiles.length > 0) {
|
if (isPR && changedFiles.length > 0) {
|
||||||
changedFilesWithSHA = changedFiles.map((file) => {
|
changedFilesWithSHA = changedFiles.map((file) => {
|
||||||
// Don't compute SHA for deleted files
|
|
||||||
if (file.changeType === "DELETED") {
|
|
||||||
return {
|
|
||||||
...file,
|
|
||||||
sha: "deleted",
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Use git hash-object to compute the SHA for the current file content
|
// Use git hash-object to compute the SHA for the current file content
|
||||||
const sha = execSync(`git hash-object "${file.path}"`, {
|
const sha = execSync(`git hash-object "${file.path}"`, {
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export async function prepareMcpConfig(
|
|||||||
"--rm",
|
"--rm",
|
||||||
"-e",
|
"-e",
|
||||||
"GITHUB_PERSONAL_ACCESS_TOKEN",
|
"GITHUB_PERSONAL_ACCESS_TOKEN",
|
||||||
"ghcr.io/github/github-mcp-server:sha-e9f748f", // https://github.com/github/github-mcp-server/releases/tag/v0.4.0
|
"ghcr.io/anthropics/github-mcp-server:sha-7382253",
|
||||||
],
|
],
|
||||||
env: {
|
env: {
|
||||||
GITHUB_PERSONAL_ACCESS_TOKEN: githubToken,
|
GITHUB_PERSONAL_ACCESS_TOKEN: githubToken,
|
||||||
|
|||||||
Reference in New Issue
Block a user