@monoweave/git 1.2.1 → 1.2.4

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.
@@ -36,6 +36,15 @@ const git = async (subcommand, { cwd, context }) => {
36
36
  return await (0, io_1.exec)(command, { cwd, env: { GIT_TERMINAL_PROMPT: '0', ...process.env } });
37
37
  };
38
38
  const gitUpstreamBranch = async ({ cwd, context, }) => {
39
+ if (process.env.GITHUB_ACTION) {
40
+ if (process.env.GITHUB_REF && process.env.GITHUB_EVENT_NAME === 'push') {
41
+ // In GitHub actions for push events, we can use GITHUB_REF.
42
+ return process.env.GITHUB_REF;
43
+ }
44
+ if (process.env.GITHUB_BASE_REF && process.env.GITHUB_EVENT_NAME === 'pull_request') {
45
+ return process.env.GITHUB_BASE_REF;
46
+ }
47
+ }
39
48
  const { stdout: branch } = await git('rev-parse --abbrev-ref --symbolic-full-name @\\{u\\}', {
40
49
  cwd,
41
50
  context,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monoweave/git",
3
- "version": "1.2.1",
3
+ "version": "1.2.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/monoweave/monoweave.git",
@@ -30,8 +30,8 @@
30
30
  "prepack": "run workspace:build \"$(pwd)\""
31
31
  },
32
32
  "devDependencies": {
33
- "@monoweave/io": "1.1.0",
34
- "@monoweave/logging": "0.0.4",
33
+ "@monoweave/io": "1.2.4",
34
+ "@monoweave/logging": "1.2.4",
35
35
  "@monoweave/test-utils": "link:../../testUtils",
36
36
  "@monoweave/types": "1.1.0",
37
37
  "@types/jest": "^29.5.12",
@@ -44,8 +44,8 @@
44
44
  "micromatch": "^4.0.5"
45
45
  },
46
46
  "peerDependencies": {
47
- "@monoweave/io": "^1.1.0",
48
- "@monoweave/logging": "^0.0.4",
47
+ "@monoweave/io": "^1.2.0",
48
+ "@monoweave/logging": "^1.2.0",
49
49
  "@monoweave/types": "^1.1.0",
50
50
  "@yarnpkg/core": "^4.0.3",
51
51
  "@yarnpkg/fslib": "^3.0.2"