Skip to content

Commit bdd6d4a

Browse files
committed
feat: add version to PR body
1 parent e6c4761 commit bdd6d4a

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

β€ŽDockerfileβ€Ž

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ ENV \
2727
WORKDIR /app
2828

2929
# Copy dependency files
30-
COPY deno.jsonc .
31-
COPY deno.lock .
30+
COPY deno.* .
3231
RUN deno install
3332

3433
# Copy source code

deno.jsonc renamed to deno.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"version": "2.0.0-alpha.1",
23
"tasks": {
34
"dev": "deno run --env-file --allow-all src/index.ts",
45
"dev:skip-full-sync": "deno task dev --skip-full-sync",

β€Žsrc/utils/helpers.tsβ€Ž

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import denoJson from "@/deno.json" with { type: "json" };
2+
13
export const getRandomCronSchedule = () => {
24
// Every 8 hours at a random minute
35
const randomMinute = Math.floor(Math.random() * 60);
@@ -13,8 +15,9 @@ export const timeout = (ms: number): Promise<void> =>
1315
export const getPRTitle = (ref: string, upstream: string): string =>
1416
`[pull] ${ref} from ${upstream}`;
1517

16-
export const getPRBody = (repoPath: string, prNumber?: number): string =>
18+
export const getPRBody = (fullName: string, prNumber?: number): string =>
1719
(prNumber
18-
? `See [Commits](/${repoPath}/pull/${prNumber}/commits) and [Changes](/${repoPath}/pull/${prNumber}/files) for more details.\n\n-----\nCreated by [<img src="https://prod.download/pull-18h-svg" valign="bottom"/> **pull[bot]**](https://github.com/wei/pull)`
19-
: 'See Commits and Changes for more details.\n\n-----\nCreated by [<img src="https://prod.download/pull-18h-svg" valign="bottom"/> **pull[bot]**](https://github.com/wei/pull)') +
20+
? `See [Commits](/${fullName}/pull/${prNumber}/commits) and [Changes](/${fullName}/pull/${prNumber}/files) for more details.`
21+
: `See Commits and Changes for more details.`) +
22+
`\n\n-----\nCreated by [<img src="https://prod.download/pull-18h-svg" valign="bottom"/> **pull[bot]** (v${denoJson.version})](https://github.com/wei/pull)` +
2023
"\n\n_Can you help keep this open source service alive? **[πŸ’– Please sponsor : )](https://prod.download/pull-pr-sponsor)**_";

0 commit comments

Comments
Β (0)