Skip to content

Commit

Permalink
*: use parametric repo, and owner from patch
Browse files Browse the repository at this point in the history
  • Loading branch information
thypon committed Dec 24, 2023
1 parent 55f9d6c commit 1334d84
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ runs:
openaiKey: options.openai_api_key,
patchBody: filteredPatch,
github: github,
owner: options.owner,
repo: options.repo,
owner: patch.owner,
repo: patch.repo,
debug: debug,
models: options.openai_models.split(" "),
amplification: options.amplification,
Expand Down
2 changes: 2 additions & 0 deletions src/getDependabotPatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ export default async function getDependabotPatch({ owner, repo, prnum,
throw new Error(`Could not fetch PR diff: ${patchResponse.status} ${patchResponse.statusText}`);

return {
repo: tRepo,
owner: tOrg,
type: "dependabot",
body: await patchResponse.text(),
watermark: `[[puLL-Merge](https://github.com/brave/pull-merge)] - [${tOrg}/${tRepo}@${fromFiltered}..${toFiltered}](${patchLink})`
Expand Down
2 changes: 2 additions & 0 deletions src/getPatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ export default async function getPatch({ owner, repo, prnum,
}

return {
repo: repo,
owner: owner,
type: "simple",
body: patchBody,
watermark: `[[puLL-Merge](https://github.com/brave/pull-merge)] - [${owner}/${repo}@${prnum}](https://github.com/${owner}/${repo}/pull/${prnum})`
Expand Down
2 changes: 2 additions & 0 deletions src/getRenovatePatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ export default async function getRenovatePatch({ owner, repo, prnum,
throw new Error(`Could not fetch PR diff: ${patchResponse.status} ${patchResponse.statusText}`);

return {
repo: tRepo,
owner: tOrg,
type: "renovate",
body: await patchResponse.text(),
watermark: `[[puLL-Merge](https://github.com/brave/pull-merge)] - [${tOrg}/${tRepo}@${fromFiltered}..${toFiltered}](${link}/compare/${fromFiltered}..${toFiltered}.diff)`
Expand Down

0 comments on commit 1334d84

Please sign in to comment.