From ddf65d9b38bd16db5d0a003379a9a328a9d5b9c7 Mon Sep 17 00:00:00 2001 From: Andrew Goldis Date: Wed, 23 Sep 2026 16:59:41 -0700 Subject: [PATCH 1/2] chore: remove the pull request commit step from the Detox example @currents/cmd 1.11.0-beta.2 records the last commit of the pull request when GitHub Actions checks out a merge commit. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01LdJrRhBLEH9Uwt97JMGVTR --- .github/workflows/jest-detox.yml | 23 ----------------------- generic-reporter/jest/detox/README.md | 24 ------------------------ 2 files changed, 47 deletions(-) diff --git a/.github/workflows/jest-detox.yml b/.github/workflows/jest-detox.yml index 7c3aa7d..e330f03 100644 --- a/.github/workflows/jest-detox.yml +++ b/.github/workflows/jest-detox.yml @@ -62,29 +62,6 @@ jobs: working-directory: generic-reporter/jest/detox script: npx detox test --configuration android.att.release --retries 1 --headless - # A pull_request run checks out a merge commit GitHub creates, so without - # this step Currents shows "Merge into " as the commit message. - # `currents upload` reads the COMMIT_INFO_* variables before git. - - name: Use the pull request commit for Currents - if: ${{ !cancelled() && github.event_name == 'pull_request' }} - env: - HEAD_SHA: ${{ github.event.pull_request.head.sha }} - HEAD_REF: ${{ github.event.pull_request.head.ref }} - run: | - git fetch --depth=1 origin "$HEAD_SHA" - # A random delimiter: a commit message line equal to a fixed one would end the - # value early and add the lines after it as variables. - delimiter="EOF_$(openssl rand -hex 16)" - { - echo "COMMIT_INFO_SHA=$HEAD_SHA" - echo "COMMIT_INFO_BRANCH=$HEAD_REF" - echo "COMMIT_INFO_AUTHOR=$(git log -1 --format=%an "$HEAD_SHA")" - echo "COMMIT_INFO_EMAIL=$(git log -1 --format=%ae "$HEAD_SHA")" - echo "COMMIT_INFO_MESSAGE<<$delimiter" - git log -1 --format=%B "$HEAD_SHA" - echo "$delimiter" - } >> "$GITHUB_ENV" - # Runs after `detox test` exits, when Detox has finished writing the # videos and logs. - name: Upload the results to Currents diff --git a/generic-reporter/jest/detox/README.md b/generic-reporter/jest/detox/README.md index 88c36d4..a5f728d 100644 --- a/generic-reporter/jest/detox/README.md +++ b/generic-reporter/jest/detox/README.md @@ -64,27 +64,3 @@ npx currents upload --project-id --key ## Run it in GitHub Actions [`.github/workflows/jest-detox.yml`](../../../.github/workflows/jest-detox.yml) builds the app, starts an emulator with [`reactivecircus/android-emulator-runner`](https://github.com/ReactiveCircus/android-emulator-runner), runs the tests with `--retries 1` and uploads the results. Set the `CURRENTS_RECORD_KEY` secret and the `CURRENTS_PROJECT_ID` value to your own. - -The workflow also sets the commit details of pull request runs. On `pull_request` events, GitHub checks out a merge commit that it creates, so without this step Currents shows the commit message as `Merge into `. The step reads the last commit of the pull request and passes it to `currents upload` through the `COMMIT_INFO_*` variables: - -```yaml -- name: Use the pull request commit for Currents - if: ${{ !cancelled() && github.event_name == 'pull_request' }} - env: - HEAD_SHA: ${{ github.event.pull_request.head.sha }} - HEAD_REF: ${{ github.event.pull_request.head.ref }} - run: | - git fetch --depth=1 origin "$HEAD_SHA" - # A random delimiter: a commit message line equal to a fixed one would end the - # value early and add the lines after it as variables. - delimiter="EOF_$(openssl rand -hex 16)" - { - echo "COMMIT_INFO_SHA=$HEAD_SHA" - echo "COMMIT_INFO_BRANCH=$HEAD_REF" - echo "COMMIT_INFO_AUTHOR=$(git log -1 --format=%an "$HEAD_SHA")" - echo "COMMIT_INFO_EMAIL=$(git log -1 --format=%ae "$HEAD_SHA")" - echo "COMMIT_INFO_MESSAGE<<$delimiter" - git log -1 --format=%B "$HEAD_SHA" - echo "$delimiter" - } >> "$GITHUB_ENV" -``` From 6db4c17d3121448aec12c24f189efcb54522d3c8 Mon Sep 17 00:00:00 2001 From: Andrew Goldis Date: Thu, 24 Sep 2026 12:19:55 -0700 Subject: [PATCH 2/2] chore: use @currents/cmd 1.11.0-beta.2 in the Detox example Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01LdJrRhBLEH9Uwt97JMGVTR --- generic-reporter/jest/detox/package-lock.json | 18 +++++++++--------- generic-reporter/jest/detox/package.json | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/generic-reporter/jest/detox/package-lock.json b/generic-reporter/jest/detox/package-lock.json index d42f3e1..651d5d5 100644 --- a/generic-reporter/jest/detox/package-lock.json +++ b/generic-reporter/jest/detox/package-lock.json @@ -16,7 +16,7 @@ "@babel/core": "^7.25.2", "@babel/preset-env": "^7.25.3", "@babel/runtime": "^7.25.0", - "@currents/cmd": "1.11.0-beta.1", + "@currents/cmd": "1.11.0-beta.2", "@currents/jest": "1.4.0-beta.1", "@react-native-community/cli": "20.1.0", "@react-native-community/cli-platform-android": "20.1.0", @@ -2010,14 +2010,14 @@ } }, "node_modules/@currents/cmd": { - "version": "1.11.0-beta.1", - "resolved": "https://registry.npmjs.org/@currents/cmd/-/cmd-1.11.0-beta.1.tgz", - "integrity": "sha512-moy/oo2662if90Cxf4lsz7JnjfDMhuF1ec4eVM9szWJBPNXxf6DjL5tqRcB/wdtzRXOpXm27/j+2rxOLHhQjRw==", + "version": "1.11.0-beta.2", + "resolved": "https://registry.npmjs.org/@currents/cmd/-/cmd-1.11.0-beta.2.tgz", + "integrity": "sha512-7wmiNkNsqLtoiLdhZSHO0/0A2GRbh0B+KW+noA6q90CHPAlAANYdbAi8+mdG2QpEuc/E7+ExRvO/+HzaD4HvsA==", "dev": true, "license": "MIT", "dependencies": { "@commander-js/extra-typings": "^13.1.0", - "@currents/commit-info": "1.0.1-beta.0", + "@currents/commit-info": "1.1.0", "archiver": "^7.0.1", "async-retry": "^1.3.3", "axios": "1.18.1", @@ -2066,9 +2066,9 @@ } }, "node_modules/@currents/commit-info": { - "version": "1.0.1-beta.0", - "resolved": "https://registry.npmjs.org/@currents/commit-info/-/commit-info-1.0.1-beta.0.tgz", - "integrity": "sha512-gkn8E3UC+F4/fCla7QAGMGgGPzxZUL9bU9+4I+KZf9PtCU3DdQCdy7a+er2eg4ewfUzZ2Ic1HcfnHuPkuLPKIw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@currents/commit-info/-/commit-info-1.1.0.tgz", + "integrity": "sha512-WyYyCXWs2leU4zXZLqnlY/N7ELcpnISVP+94brKs/MBoXNlXN5RDW8TIM9C4UYmKAMAg0oNU9/tKRM9GKWTmbg==", "dev": true, "license": "MIT", "dependencies": { @@ -2080,7 +2080,7 @@ "ramda": "0.26.1" }, "engines": { - "node": ">=6" + "node": ">=8" } }, "node_modules/@currents/commit-info/node_modules/cross-spawn": { diff --git a/generic-reporter/jest/detox/package.json b/generic-reporter/jest/detox/package.json index d1901da..2857f17 100644 --- a/generic-reporter/jest/detox/package.json +++ b/generic-reporter/jest/detox/package.json @@ -18,7 +18,7 @@ "@babel/core": "^7.25.2", "@babel/preset-env": "^7.25.3", "@babel/runtime": "^7.25.0", - "@currents/cmd": "1.11.0-beta.1", + "@currents/cmd": "1.11.0-beta.2", "@currents/jest": "1.4.0-beta.1", "@react-native-community/cli": "20.1.0", "@react-native-community/cli-platform-android": "20.1.0",