apify-test-tools 0.5.0 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/.prettierrc +5 -0
  2. package/.vscode/settings.json +3 -0
  3. package/CHANGELOG.md +10 -0
  4. package/bin/git.ts +24 -44
  5. package/bin/github.ts +5 -14
  6. package/bin/main.ts +38 -38
  7. package/bin/slack.ts +13 -16
  8. package/dist/bin/git.d.ts +9 -4
  9. package/dist/bin/git.d.ts.map +1 -1
  10. package/dist/bin/git.js +15 -36
  11. package/dist/bin/git.js.map +1 -1
  12. package/dist/bin/github.d.ts +1 -1
  13. package/dist/bin/github.d.ts.map +1 -1
  14. package/dist/bin/github.js +3 -9
  15. package/dist/bin/github.js.map +1 -1
  16. package/dist/bin/main.js +5 -7
  17. package/dist/bin/main.js.map +1 -1
  18. package/dist/bin/slack.d.ts +2 -2
  19. package/dist/bin/slack.d.ts.map +1 -1
  20. package/dist/bin/slack.js +4 -2
  21. package/dist/bin/slack.js.map +1 -1
  22. package/dist/lib/consts.d.ts +1 -1
  23. package/dist/lib/consts.d.ts.map +1 -1
  24. package/dist/lib/consts.js +1 -4
  25. package/dist/lib/consts.js.map +1 -1
  26. package/dist/lib/extend-expect.d.ts.map +1 -1
  27. package/dist/lib/extend-expect.js +11 -2
  28. package/dist/lib/extend-expect.js.map +1 -1
  29. package/dist/lib/lib.d.ts +1 -1
  30. package/dist/lib/lib.d.ts.map +1 -1
  31. package/dist/lib/lib.js +12 -9
  32. package/dist/lib/lib.js.map +1 -1
  33. package/dist/lib/run-test-result.d.ts +1 -1
  34. package/dist/lib/run-test-result.d.ts.map +1 -1
  35. package/dist/lib/run-test-result.js +1 -0
  36. package/dist/lib/run-test-result.js.map +1 -1
  37. package/dist/lib/types.d.ts +2 -0
  38. package/dist/lib/types.d.ts.map +1 -1
  39. package/dist/test/unit/bin/git.test.d.ts +2 -0
  40. package/dist/test/unit/bin/git.test.d.ts.map +1 -0
  41. package/dist/test/unit/bin/git.test.js +81 -0
  42. package/dist/test/unit/bin/git.test.js.map +1 -0
  43. package/dist/test/unit/custom-matchers.test.js +2 -2
  44. package/dist/test/unit/custom-matchers.test.js.map +1 -1
  45. package/dist/test/unit/parse-commit.test.js +5 -5
  46. package/dist/test/unit/parse-commit.test.js.map +1 -1
  47. package/dist/tsconfig.tsbuildinfo +1 -1
  48. package/lib/consts.ts +2 -5
  49. package/lib/extend-expect.ts +38 -25
  50. package/lib/lib.ts +31 -42
  51. package/lib/run-test-result.ts +9 -10
  52. package/lib/types.ts +69 -68
  53. package/package.json +4 -1
  54. package/test/unit/bin/git.test.ts +109 -0
  55. package/test/unit/custom-matchers.test.ts +6 -9
  56. package/test/unit/parse-commit.test.ts +6 -7
  57. package/tsconfig.json +4 -8
  58. package/test/unit/test-actor.test.ts +0 -17
package/.prettierrc ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "printWidth": 120,
3
+ "tabWidth": 4,
4
+ "singleQuote": true
5
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "typescript.tsdk": "node_modules/typescript/lib"
3
+ }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.2
4
+
5
+ fix: file diffs between commits
6
+ feat: annotate runs with test names
7
+
8
+ ## 0.5.1
9
+
10
+ fix: properly check on maxRetriesPerRequest
11
+ fix: change module resolution to nodenext and fix types
12
+
3
13
  ## 0.5.0
4
14
 
5
15
  feat: feat: add maxRetriesPerRequest test
package/bin/git.ts CHANGED
@@ -1,57 +1,37 @@
1
- import { Commit, Config } from './types';
1
+ import { Commit, Config } from './types.js';
2
2
  import { spawnCommandInGhWorkspace } from './utils.js';
3
3
 
4
4
  export const GIT_FORMAT_SEPARATOR = '»¦«';
5
5
  const GIT_LOG_FORMAT = ['%H', '%aN<%aE>', '%aD', '%s'].join(GIT_FORMAT_SEPARATOR);
6
6
 
7
-
8
- export const getBranchLastCommit = (branch: string): Commit => {
9
- const commitString = spawnCommandInGhWorkspace(`git log -1 --pretty=format:'${GIT_LOG_FORMAT}' ${branch}`);
10
- const commit = parseCommit(commitString);
11
- return commit;
12
- };
13
-
7
+ /**
8
+ * Gets the list of changed files between the given commits (inclusive).
9
+ */
14
10
  export const getChangedFiles = (commits: Commit[]) => {
15
- const changedFiles = commits.length === 1
16
- ? spawnCommandInGhWorkspace(`git show --pretty='format:' --name-only ${commits[0].sha}`)
17
- : spawnCommandInGhWorkspace(`git diff --name-only ${commits[0].sha}..${commits[commits.length - 1].sha}`);
11
+ const changedFiles = spawnCommandInGhWorkspace(
12
+ `git diff --name-only ${commits[0].sha}~..${commits[commits.length - 1].sha}`,
13
+ );
14
+
18
15
  return changedFiles.split('\n');
19
16
  };
20
17
 
21
- export const getCommits = ({
22
- sourceBranch,
23
- targetBranch,
24
- baseCommit: baseCommitSha,
25
- }: Config): Commit[] => {
26
- const targetBranchCommit = getBranchLastCommit(targetBranch);
27
- const sourceBranchCommit = getBranchLastCommit(sourceBranch);
28
- let baseCommit: Commit | undefined;
29
- if (baseCommitSha) {
30
- try {
31
- baseCommit = getCommitInfo(baseCommitSha);
32
- } catch (err) {
33
- console.warn(`Failed to get base commit "${baseCommitSha}", it will not be used: ${err}`);
34
- }
35
- }
36
- // const baseCommit = baseCommitSha !== undefined ? : undefined;
37
- // const gitOutputFormat = '{"sha":"%H","author":"%aN<%aE>","date":"%aD","message":"%f"}';
38
- // console.log(`git log --pretty=format:"${gitOutputFormat}" ${targetBranch}..${sourceBranch}`);
39
- // return [];
40
- const base = getBaseCommit(sourceBranchCommit, targetBranchCommit);
41
- const commitsStrings = spawnCommandInGhWorkspace(`git log --pretty=format:'${GIT_LOG_FORMAT}' ${base.sha}..${sourceBranchCommit.sha}`)
42
- .split('\n');
43
- const commits = commitsStrings.map((commitString) => parseCommit(commitString)) as Commit[];
18
+ /**
19
+ * Gets the commits between sourceBranch and targetBranch (exclusive).
20
+ * - If baseCommit is provided, only returns commits after the baseCommit.
21
+ */
22
+ export const getCommits = ({ sourceBranch, targetBranch, baseCommit: baseCommitSha }: Config): Commit[] => {
23
+ const commitsStrings = spawnCommandInGhWorkspace(
24
+ `git log --pretty=format:'${GIT_LOG_FORMAT}' ${targetBranch}..${sourceBranch}`,
25
+ ).split('\n');
26
+ const commits = commitsStrings.map((commitString) => parseCommit(commitString));
44
27
  commits.reverse();
45
- const baseCommitIndex = baseCommit
46
- ? commits.findIndex(({ sha }) => sha === baseCommit.sha)
47
- : -1;
48
- return commits.slice(baseCommitIndex + 1);
49
- };
50
28
 
51
- export const getBaseCommit = (target: Commit, source: Commit): Commit => {
52
- const baseCommitSha = spawnCommandInGhWorkspace(`git merge-base ${target.sha} ${source.sha}`);
53
- const baseCommit = getCommitInfo(baseCommitSha);
54
- return baseCommit;
29
+ const baseCommitIndex = commits.findIndex((commit) => commit.sha === baseCommitSha);
30
+
31
+ const hasBaseCommit = baseCommitIndex !== -1;
32
+ if (hasBaseCommit) return commits.slice(baseCommitIndex + 1);
33
+
34
+ return commits;
55
35
  };
56
36
 
57
37
  export const getCommitInfo = (commitSha: string): Commit => {
@@ -72,4 +52,4 @@ export const parseCommit = (commitString: string): Commit => {
72
52
  date,
73
53
  message,
74
54
  };
75
- }
55
+ };
package/bin/github.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import fs from 'fs/promises';
2
- import { Commit, GitHubEventPush } from './types';
2
+ import { Commit, GitHubEventPush } from './types.js';
3
3
  import { spawnCommandInGhWorkspace } from './utils.js';
4
4
 
5
5
  export const getPushData = async (path: string) => {
@@ -8,7 +8,7 @@ export const getPushData = async (path: string) => {
8
8
  const {
9
9
  commits: ghCommits,
10
10
  repository: { ssh_url: repoUrl, name },
11
- head_commit: { author }
11
+ head_commit: { author },
12
12
  } = event;
13
13
  const commits: Commit[] = ghCommits.map(({ author, message, id, timestamp }) => ({
14
14
  author: author.username,
@@ -25,7 +25,7 @@ export const getPushData = async (path: string) => {
25
25
  repoUrl,
26
26
  changelog,
27
27
  repository: name,
28
- author: author.name
28
+ author: author.name,
29
29
  };
30
30
  };
31
31
 
@@ -39,22 +39,13 @@ const getChangedFiles = ({ after, before }: GitHubEventPush): string[] => {
39
39
  return changedFiles.split('\n');
40
40
  };
41
41
 
42
- export const getChangelogChanges = (
43
- changedFiles: string[],
44
- event: GitHubEventPush,
45
- ): string | null => {
42
+ export const getChangelogChanges = (changedFiles: string[], event: GitHubEventPush): string | null => {
46
43
  const changelogPath = 'CHANGELOG.md';
47
44
  if (!changedFiles.includes(changelogPath)) {
48
45
  return null;
49
46
  }
50
47
  const { after, before } = event;
51
- const diff = spawnCommandInGhWorkspace('git', [
52
- 'diff',
53
- before,
54
- after,
55
- '--',
56
- changelogPath,
57
- ]);
48
+ const diff = spawnCommandInGhWorkspace('git', ['diff', before, after, '--', changelogPath]);
58
49
 
59
50
  const added: string[] = [];
60
51
  let startedChangelog = false;
package/bin/main.ts CHANGED
@@ -1,15 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import process from 'process';
4
- import yargs from 'yargs';
4
+ import yargs, { type Argv } from 'yargs';
5
5
  import { hideBin } from 'yargs/helpers';
6
6
 
7
- import {
8
- getRepoActors,
9
- getChangedActors,
10
- spawnCommandInGhWorkspace,
11
- setCwd,
12
- } from './utils.js';
7
+ import { getRepoActors, getChangedActors, spawnCommandInGhWorkspace, setCwd } from './utils.js';
13
8
  import { runBuilds } from './build.js';
14
9
  import { getChangedFiles, getCommits } from './git.js';
15
10
  import { getPushData } from './github.js';
@@ -21,7 +16,7 @@ import { reportTestRestuls } from './test-report.js';
21
16
  */
22
17
  const middlewares = [setCwd];
23
18
 
24
- const buildOptions = (y: yargs.Argv) => {
19
+ const buildOptions = (y: Argv) => {
25
20
  return y
26
21
  .option('target-branch', {
27
22
  type: 'string',
@@ -33,7 +28,7 @@ const buildOptions = (y: yargs.Argv) => {
33
28
  })
34
29
  .option('base-commit', {
35
30
  type: 'string',
36
- })
31
+ });
37
32
  };
38
33
 
39
34
  await yargs()
@@ -61,10 +56,15 @@ await yargs()
61
56
  const changedFiles = getChangedFiles(commits);
62
57
  console.log(JSON.stringify(changedFiles));
63
58
  })
64
- .command('get-actor-configs', '', (_) => _, async () => {
65
- const actorConfigs = await getRepoActors();
66
- console.log(JSON.stringify(actorConfigs));
67
- })
59
+ .command(
60
+ 'get-actor-configs',
61
+ '',
62
+ (_) => _,
63
+ async () => {
64
+ const actorConfigs = await getRepoActors();
65
+ console.log(JSON.stringify(actorConfigs));
66
+ }
67
+ )
68
68
  .command('get-affected-actors', '', buildOptions, async (args) => {
69
69
  const commits = getCommits(args);
70
70
  const changedFiles = getChangedFiles(commits);
@@ -75,19 +75,20 @@ await yargs()
75
75
  .command(
76
76
  'report-tests',
77
77
  '',
78
- (args) => args
79
- .option('report-file', { type: 'string', demandOption: true })
80
- .option('job-url', { type: 'string' })
81
- .option('workflow-name', { type: 'string' })
82
- .option('repository', { type: 'string' }),
78
+ (args) =>
79
+ args
80
+ .option('report-file', { type: 'string', demandOption: true })
81
+ .option('job-url', { type: 'string' })
82
+ .option('workflow-name', { type: 'string' })
83
+ .option('repository', { type: 'string' }),
83
84
  async (args) => {
84
85
  await reportTestRestuls(args);
85
- })
86
+ }
87
+ )
86
88
  .command(
87
89
  'build',
88
90
  '',
89
- (args) => buildOptions(args)
90
- .option('dry-run', { type: 'boolean', default: false }),
91
+ (args) => buildOptions(args).option('dry-run', { type: 'boolean', default: false }),
91
92
  async (args) => {
92
93
  const commits = getCommits(args);
93
94
  const changedFiles = getChangedFiles(commits);
@@ -98,8 +99,10 @@ await yargs()
98
99
  });
99
100
  // https://github.com/apify-store/google-maps#:actors/lukaskrivka_google-maps-with-contact-details
100
101
  // git@github.com:apify-store/google-maps#:actors/lukaskrivka_google-maps-with-contact-details
101
- const repoUrl = spawnCommandInGhWorkspace(`git remote get-url origin`)
102
- .replace(/^https:\/\/github\.com\//, 'git@github.com:');
102
+ const repoUrl = spawnCommandInGhWorkspace(`git remote get-url origin`).replace(
103
+ /^https:\/\/github\.com\//,
104
+ 'git@github.com:'
105
+ );
103
106
 
104
107
  const builds = await runBuilds({
105
108
  repoUrl,
@@ -108,23 +111,19 @@ await yargs()
108
111
  dryRun: args.dryRun,
109
112
  });
110
113
  console.log(JSON.stringify(builds));
111
- })
114
+ }
115
+ )
112
116
  .command(
113
117
  'release',
114
118
  '',
115
- (args) => args
116
- .option('push-event-path', { type: 'string', demandOption: true })
117
- .option('dry-run', { type: 'boolean', default: false }),
119
+ (args) =>
120
+ args
121
+ .option('push-event-path', { type: 'string', demandOption: true })
122
+ .option('dry-run', { type: 'boolean', default: false }),
118
123
  async (args) => {
119
- const {
120
- branch,
121
- changedFiles,
122
- repoUrl,
123
- commits,
124
- changelog,
125
- repository,
126
- author,
127
- } = await getPushData(args.pushEventPath);
124
+ const { branch, changedFiles, repoUrl, commits, changelog, repository, author } = await getPushData(
125
+ args.pushEventPath
126
+ );
128
127
  const isLatest = true;
129
128
  const actorConfigs = await getRepoActors();
130
129
  const { actorsChanged } = getChangedActors({
@@ -149,9 +148,10 @@ await yargs()
149
148
  changelog,
150
149
  repository,
151
150
  dryRun,
152
- author
151
+ author,
153
152
  });
154
- })
153
+ }
154
+ )
155
155
  .strictCommands()
156
156
  .demandCommand(1, 'Command is required')
157
157
  .parse(hideBin(process.argv));
package/bin/slack.ts CHANGED
@@ -1,15 +1,15 @@
1
1
  import { WebClient } from '@slack/web-api';
2
- import { Commit } from './types';
2
+ import { Commit } from './types.js';
3
3
  import { getEnvVar } from './utils.js';
4
4
 
5
5
  type NotifyToSlackOptions = {
6
- repository: string
7
- changedFiles: string[]
8
- changelog: string | null
9
- commits: Commit[]
10
- dryRun: boolean
11
- author: string
12
- }
6
+ repository: string;
7
+ changedFiles: string[];
8
+ changelog: string | null;
9
+ commits: Commit[];
10
+ dryRun: boolean;
11
+ author: string;
12
+ };
13
13
 
14
14
  export const notifyToSlack = async ({
15
15
  changedFiles,
@@ -17,7 +17,7 @@ export const notifyToSlack = async ({
17
17
  changelog,
18
18
  repository,
19
19
  dryRun,
20
- author
20
+ author,
21
21
  }: NotifyToSlackOptions) => {
22
22
  const slack = new WebClient(getEnvVar('SLACK_TOKEN_RELEASES_BOT'));
23
23
 
@@ -42,7 +42,9 @@ export const notifyToSlack = async ({
42
42
  }
43
43
  }
44
44
 
45
- const commitsMessage = `${commits.map(({ author, message }, index) => `${index + 1}. Commit message: ${message}\n\tAuthor: ${author}.`).join('\n')}`;
45
+ const commitsMessage = `${commits
46
+ .map(({ author, message }, index) => `${index + 1}. Commit message: ${message}\n\tAuthor: ${author}.`)
47
+ .join('\n')}`;
46
48
  const changedFilesMessage = `**Files changed**: ${changedFiles.join(', ')}`;
47
49
  const longMessage = `${shortMessage}\n**Commit list**:\n${commitsMessage}\n\n${changedFilesMessage}`;
48
50
 
@@ -59,12 +61,7 @@ export const notifyToSlack = async ({
59
61
  }
60
62
  };
61
63
 
62
- export const sendSlackMessage = async (
63
- channel: string,
64
- text: string,
65
- blocks: string[],
66
- token: string,
67
- ) => {
64
+ export const sendSlackMessage = async (channel: string, text: string, blocks: string[], token: string) => {
68
65
  const slack = new WebClient(token);
69
66
  const { ts } = await slack.chat.postMessage({ text, channel });
70
67
  if (blocks.length > 0 && ts) {
package/dist/bin/git.d.ts CHANGED
@@ -1,9 +1,14 @@
1
- import { Commit, Config } from './types';
1
+ import { Commit, Config } from './types.js';
2
2
  export declare const GIT_FORMAT_SEPARATOR = "\u00BB\u00A6\u00AB";
3
- export declare const getBranchLastCommit: (branch: string) => Commit;
3
+ /**
4
+ * Gets the list of changed files between the given commits (inclusive).
5
+ */
4
6
  export declare const getChangedFiles: (commits: Commit[]) => string[];
5
- export declare const getCommits: ({ sourceBranch, targetBranch, baseCommit: baseCommitSha, }: Config) => Commit[];
6
- export declare const getBaseCommit: (target: Commit, source: Commit) => Commit;
7
+ /**
8
+ * Gets the commits between sourceBranch and targetBranch (exclusive).
9
+ * - If baseCommit is provided, only returns commits after the baseCommit.
10
+ */
11
+ export declare const getCommits: ({ sourceBranch, targetBranch, baseCommit: baseCommitSha }: Config) => Commit[];
7
12
  export declare const getCommitInfo: (commitSha: string) => Commit;
8
13
  export declare const parseCommit: (commitString: string) => Commit;
9
14
  //# sourceMappingURL=git.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../bin/git.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAGzC,eAAO,MAAM,oBAAoB,uBAAQ,CAAC;AAI1C,eAAO,MAAM,mBAAmB,GAAI,QAAQ,MAAM,KAAG,MAIpD,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,SAAS,MAAM,EAAE,aAKhD,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,4DAIxB,MAAM,KAAG,MAAM,EAwBjB,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,QAAQ,MAAM,EAAE,QAAQ,MAAM,KAAG,MAI9D,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,WAAW,MAAM,KAAG,MAIjD,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,cAAc,MAAM,KAAG,MAYlD,CAAA"}
1
+ {"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../bin/git.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAG5C,eAAO,MAAM,oBAAoB,uBAAQ,CAAC;AAG1C;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,SAAS,MAAM,EAAE,aAMhD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,GAAI,2DAA2D,MAAM,KAAG,MAAM,EAapG,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,WAAW,MAAM,KAAG,MAIjD,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,cAAc,MAAM,KAAG,MAYlD,CAAC"}
package/dist/bin/git.js CHANGED
@@ -1,47 +1,26 @@
1
1
  import { spawnCommandInGhWorkspace } from './utils.js';
2
2
  export const GIT_FORMAT_SEPARATOR = '»¦«';
3
3
  const GIT_LOG_FORMAT = ['%H', '%aN<%aE>', '%aD', '%s'].join(GIT_FORMAT_SEPARATOR);
4
- export const getBranchLastCommit = (branch) => {
5
- const commitString = spawnCommandInGhWorkspace(`git log -1 --pretty=format:'${GIT_LOG_FORMAT}' ${branch}`);
6
- const commit = parseCommit(commitString);
7
- return commit;
8
- };
4
+ /**
5
+ * Gets the list of changed files between the given commits (inclusive).
6
+ */
9
7
  export const getChangedFiles = (commits) => {
10
- const changedFiles = commits.length === 1
11
- ? spawnCommandInGhWorkspace(`git show --pretty='format:' --name-only ${commits[0].sha}`)
12
- : spawnCommandInGhWorkspace(`git diff --name-only ${commits[0].sha}..${commits[commits.length - 1].sha}`);
8
+ const changedFiles = spawnCommandInGhWorkspace(`git diff --name-only ${commits[0].sha}~..${commits[commits.length - 1].sha}`);
13
9
  return changedFiles.split('\n');
14
10
  };
15
- export const getCommits = ({ sourceBranch, targetBranch, baseCommit: baseCommitSha, }) => {
16
- const targetBranchCommit = getBranchLastCommit(targetBranch);
17
- const sourceBranchCommit = getBranchLastCommit(sourceBranch);
18
- let baseCommit;
19
- if (baseCommitSha) {
20
- try {
21
- baseCommit = getCommitInfo(baseCommitSha);
22
- }
23
- catch (err) {
24
- console.warn(`Failed to get base commit "${baseCommitSha}", it will not be used: ${err}`);
25
- }
26
- }
27
- // const baseCommit = baseCommitSha !== undefined ? : undefined;
28
- // const gitOutputFormat = '{"sha":"%H","author":"%aN<%aE>","date":"%aD","message":"%f"}';
29
- // console.log(`git log --pretty=format:"${gitOutputFormat}" ${targetBranch}..${sourceBranch}`);
30
- // return [];
31
- const base = getBaseCommit(sourceBranchCommit, targetBranchCommit);
32
- const commitsStrings = spawnCommandInGhWorkspace(`git log --pretty=format:'${GIT_LOG_FORMAT}' ${base.sha}..${sourceBranchCommit.sha}`)
33
- .split('\n');
11
+ /**
12
+ * Gets the commits between sourceBranch and targetBranch (exclusive).
13
+ * - If baseCommit is provided, only returns commits after the baseCommit.
14
+ */
15
+ export const getCommits = ({ sourceBranch, targetBranch, baseCommit: baseCommitSha }) => {
16
+ const commitsStrings = spawnCommandInGhWorkspace(`git log --pretty=format:'${GIT_LOG_FORMAT}' ${targetBranch}..${sourceBranch}`).split('\n');
34
17
  const commits = commitsStrings.map((commitString) => parseCommit(commitString));
35
18
  commits.reverse();
36
- const baseCommitIndex = baseCommit
37
- ? commits.findIndex(({ sha }) => sha === baseCommit.sha)
38
- : -1;
39
- return commits.slice(baseCommitIndex + 1);
40
- };
41
- export const getBaseCommit = (target, source) => {
42
- const baseCommitSha = spawnCommandInGhWorkspace(`git merge-base ${target.sha} ${source.sha}`);
43
- const baseCommit = getCommitInfo(baseCommitSha);
44
- return baseCommit;
19
+ const baseCommitIndex = commits.findIndex((commit) => commit.sha === baseCommitSha);
20
+ const hasBaseCommit = baseCommitIndex !== -1;
21
+ if (hasBaseCommit)
22
+ return commits.slice(baseCommitIndex + 1);
23
+ return commits;
45
24
  };
46
25
  export const getCommitInfo = (commitSha) => {
47
26
  const commitString = spawnCommandInGhWorkspace(`git log -1 --pretty=format:'${GIT_LOG_FORMAT}' ${commitSha}`);
@@ -1 +1 @@
1
- {"version":3,"file":"git.js","sourceRoot":"","sources":["../../bin/git.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAEvD,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC;AAC1C,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;AAGlF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,MAAc,EAAU,EAAE;IAC1D,MAAM,YAAY,GAAG,yBAAyB,CAAC,+BAA+B,cAAc,KAAK,MAAM,EAAE,CAAC,CAAC;IAC3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CAAC,SAAS,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,KAAK,aAAa,CAAC,CAAC;IAEpF,MAAM,aAAa,GAAG,eAAe,KAAK,CAAC,CAAC,CAAC;IAC7C,IAAI,aAAa;QAAE,OAAO,OAAO,CAAC,KAAK,CAAC,eAAe,GAAG,CAAC,CAAC,CAAC;IAE7D,OAAO,OAAO,CAAC;AACnB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,SAAiB,EAAU,EAAE;IACvD,MAAM,YAAY,GAAG,yBAAyB,CAAC,+BAA+B,cAAc,KAAK,SAAS,EAAE,CAAC,CAAC;IAC9G,MAAM,MAAM,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC;IACzC,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,YAAoB,EAAU,EAAE;IACxD,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;IACxD,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,kCAAkC,YAAY,EAAE,CAAC,CAAC;IACtE,CAAC;IACD,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC;IAC5C,OAAO;QACH,GAAG;QACH,MAAM;QACN,IAAI;QACJ,OAAO;KACV,CAAC;AACN,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Commit, GitHubEventPush } from './types';
1
+ import { Commit, GitHubEventPush } from './types.js';
2
2
  export declare const getPushData: (path: string) => Promise<{
3
3
  branch: string;
4
4
  commits: Commit[];
@@ -1 +1 @@
1
- {"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../bin/github.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAGlD,eAAO,MAAM,WAAW,GAAU,MAAM,MAAM;;;;;;;;EAyB7C,CAAC;AAEF,eAAO,MAAM,eAAe,GAAU,MAAM,MAAM,KAAG,OAAO,CAAC,eAAe,CAG3E,CAAC;AAOF,eAAO,MAAM,mBAAmB,GAC5B,cAAc,MAAM,EAAE,EACtB,OAAO,eAAe,KACvB,MAAM,GAAG,IAgCX,CAAC"}
1
+ {"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../bin/github.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAGrD,eAAO,MAAM,WAAW,GAAU,MAAM,MAAM;;;;;;;;EAyB7C,CAAC;AAEF,eAAO,MAAM,eAAe,GAAU,MAAM,MAAM,KAAG,OAAO,CAAC,eAAe,CAG3E,CAAC;AAOF,eAAO,MAAM,mBAAmB,GAAI,cAAc,MAAM,EAAE,EAAE,OAAO,eAAe,KAAG,MAAM,GAAG,IA0B7F,CAAC"}
@@ -3,7 +3,7 @@ import { spawnCommandInGhWorkspace } from './utils.js';
3
3
  export const getPushData = async (path) => {
4
4
  const event = await loadGitHubEvent(path);
5
5
  const branch = event.ref.replace('refs/heads/', '');
6
- const { commits: ghCommits, repository: { ssh_url: repoUrl, name }, head_commit: { author } } = event;
6
+ const { commits: ghCommits, repository: { ssh_url: repoUrl, name }, head_commit: { author }, } = event;
7
7
  const commits = ghCommits.map(({ author, message, id, timestamp }) => ({
8
8
  author: author.username,
9
9
  sha: id,
@@ -19,7 +19,7 @@ export const getPushData = async (path) => {
19
19
  repoUrl,
20
20
  changelog,
21
21
  repository: name,
22
- author: author.name
22
+ author: author.name,
23
23
  };
24
24
  };
25
25
  export const loadGitHubEvent = async (path) => {
@@ -36,13 +36,7 @@ export const getChangelogChanges = (changedFiles, event) => {
36
36
  return null;
37
37
  }
38
38
  const { after, before } = event;
39
- const diff = spawnCommandInGhWorkspace('git', [
40
- 'diff',
41
- before,
42
- after,
43
- '--',
44
- changelogPath,
45
- ]);
39
+ const diff = spawnCommandInGhWorkspace('git', ['diff', before, after, '--', changelogPath]);
46
40
  const added = [];
47
41
  let startedChangelog = false;
48
42
  for (const line of diff.split('\n')) {
@@ -1 +1 @@
1
- {"version":3,"file":"github.js","sourceRoot":"","sources":["../../bin/github.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,aAAa,CAAC;AAE7B,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAEvD,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,EAAE,IAAY,EAAE,EAAE;IAC9C,MAAM,KAAK,GAAG,MAAM,eAAe,CAAC,IAAI,CAAC,CAAC;IAC1C,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;IACpD,MAAM,EACF,OAAO,EAAE,SAAS,EAClB,UAAU,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,EACtC,WAAW,EAAE,EAAE,MAAM,EAAE,EAC1B,GAAG,KAAK,CAAC;IACV,MAAM,OAAO,GAAa,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC;QAC7E,MAAM,EAAE,MAAM,CAAC,QAAQ;QACvB,GAAG,EAAE,EAAE;QACP,OAAO;QACP,IAAI,EAAE,SAAS;KAClB,CAAC,CAAC,CAAC;IACJ,MAAM,YAAY,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,SAAS,GAAG,mBAAmB,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;IAC3D,OAAO;QACH,MAAM;QACN,OAAO;QACP,YAAY;QACZ,OAAO;QACP,SAAS;QACT,UAAU,EAAE,IAAI;QAChB,MAAM,EAAE,MAAM,CAAC,IAAI;KACtB,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GA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AAE,CAAC;QAClC,0GAA0G;QAC1G,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC;YACrF,gBAAgB,GAAG,IAAI,CAAC;YACxB,SAAS;QACb,CAAC;QACD,IAAI,gBAAgB,EAAE,CAAC;YACnB,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC1B,MAAM;YACV,CAAC;YACD,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;gBACvB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;YACrC,CAAC;QACL,CAAC;IACL,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;AACnC,CAAC,CAAC"}
package/dist/bin/main.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import process from 'process';
3
3
  import yargs from 'yargs';
4
4
  import { hideBin } from 'yargs/helpers';
5
- import { getRepoActors, getChangedActors, spawnCommandInGhWorkspace, setCwd, } from './utils.js';
5
+ import { getRepoActors, getChangedActors, spawnCommandInGhWorkspace, setCwd } from './utils.js';
6
6
  import { runBuilds } from './build.js';
7
7
  import { getChangedFiles, getCommits } from './git.js';
8
8
  import { getPushData } from './github.js';
@@ -69,8 +69,7 @@ await yargs()
69
69
  .option('repository', { type: 'string' }), async (args) => {
70
70
  await reportTestRestuls(args);
71
71
  })
72
- .command('build', '', (args) => buildOptions(args)
73
- .option('dry-run', { type: 'boolean', default: false }), async (args) => {
72
+ .command('build', '', (args) => buildOptions(args).option('dry-run', { type: 'boolean', default: false }), async (args) => {
74
73
  const commits = getCommits(args);
75
74
  const changedFiles = getChangedFiles(commits);
76
75
  const actorConfigs = await getRepoActors();
@@ -80,8 +79,7 @@ await yargs()
80
79
  });
81
80
  // https://github.com/apify-store/google-maps#:actors/lukaskrivka_google-maps-with-contact-details
82
81
  // git@github.com:apify-store/google-maps#:actors/lukaskrivka_google-maps-with-contact-details
83
- const repoUrl = spawnCommandInGhWorkspace(`git remote get-url origin`)
84
- .replace(/^https:\/\/github\.com\//, 'git@github.com:');
82
+ const repoUrl = spawnCommandInGhWorkspace(`git remote get-url origin`).replace(/^https:\/\/github\.com\//, 'git@github.com:');
85
83
  const builds = await runBuilds({
86
84
  repoUrl,
87
85
  actorConfigs: actorsChanged,
@@ -93,7 +91,7 @@ await yargs()
93
91
  .command('release', '', (args) => args
94
92
  .option('push-event-path', { type: 'string', demandOption: true })
95
93
  .option('dry-run', { type: 'boolean', default: false }), async (args) => {
96
- const { branch, changedFiles, repoUrl, commits, changelog, repository, author, } = await getPushData(args.pushEventPath);
94
+ const { branch, changedFiles, repoUrl, commits, changelog, repository, author } = await getPushData(args.pushEventPath);
97
95
  const isLatest = true;
98
96
  const actorConfigs = await getRepoActors();
99
97
  const { actorsChanged } = getChangedActors({
@@ -117,7 +115,7 @@ await yargs()
117
115
  changelog,
118
116
  repository,
119
117
  dryRun,
120
- author
118
+ author,
121
119
  });
122
120
  })
123
121
  .strictCommands()
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sourceRoot":"","sources":["../../bin/main.ts"],"names":[],"mappings":";AAEA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EACH,aAAa,EACb,gBAAgB,EAChB,yBAAyB,EACzB,MAAM,GACT,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,a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AC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;IAEtC,4BAA4B;IAC5B,MAAM,aAAa,CAAC;QAChB,YAAY;QACZ,OAAO;QACP,SAAS;QACT,UAAU;QACV,MAAM;QACN,MAAM;KACT,CAAC,CAAC;AACP,CAAC,CACJ;KACA,cAAc,EAAE;KAChB,aAAa,CAAC,CAAC,EAAE,qBAAqB,CAAC;KACvC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Commit } from './types';
1
+ import { Commit } from './types.js';
2
2
  type NotifyToSlackOptions = {
3
3
  repository: string;
4
4
  changedFiles: string[];
@@ -7,7 +7,7 @@ type NotifyToSlackOptions = {
7
7
  dryRun: boolean;
8
8
  author: string;
9
9
  };
10
- export declare const notifyToSlack: ({ changedFiles, commits, changelog, repository, dryRun, author }: NotifyToSlackOptions) => Promise<void>;
10
+ export declare const notifyToSlack: ({ changedFiles, commits, changelog, repository, dryRun, author, }: NotifyToSlackOptions) => Promise<void>;
11
11
  export declare const sendSlackMessage: (channel: string, text: string, blocks: string[], token: string) => Promise<void>;
12
12
  export {};
13
13
  //# sourceMappingURL=slack.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"slack.d.ts","sourceRoot":"","sources":["../../bin/slack.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAGjC,KAAK,oBAAoB,GAAG;IACxB,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,MAAM,EAAE,OAAO,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,aAAa,GAAU,kEAOjC,oBAAoB,kBAuCtB,CAAC;AAEF,eAAO,MAAM,gBAAgB,GACzB,SAAS,MAAM,EACf,MAAM,MAAM,EACZ,QAAQ,MAAM,EAAE,EAChB,OAAO,MAAM,kBAWhB,CAAC"}
1
+ {"version":3,"file":"slack.d.ts","sourceRoot":"","sources":["../../bin/slack.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAGpC,KAAK,oBAAoB,GAAG;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,aAAa,GAAU,mEAOjC,oBAAoB,kBAyCtB,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAU,SAAS,MAAM,EAAE,MAAM,MAAM,EAAE,QAAQ,MAAM,EAAE,EAAE,OAAO,MAAM,kBAUpG,CAAC"}