Concern 1: Pull request numbers are not being recorded for Cypress runs executed by GithHub Actions.
Concern 2: Relevant branch names are not being recorded for Cypress runs executed by GitHub Actions in some circumstances.
| import _ from 'lodash' | |
| import { EventEmitter } from 'events' | |
| import Promise from 'bluebird' | |
| import { action } from 'mobx' | |
| import { client } from '@packages/socket' | |
| import { studioRecorder } from './studio' | |
| import { automation } from './automation' | |
| import { logger } from './logger' | 
| // https://www.npmjs.com/package/chrome-remote-interface | |
| const CRI = require('chrome-remote-interface') | |
| const run = async () => { | |
| const versionInfo = await CRI.Version({ host: '127.0.0.1', port: 51959 }) | |
| const cri = await CRI({ | |
| target: versionInfo.webSocketDebuggerUrl, | |
| local: true, | |
| }) | 
| // FF 101 Log | |
| 1655944857991 RemoteAgent DEBUG WebDriver BiDi enabled | |
| 1655944857991 RemoteAgent DEBUG CDP enabled | |
| 1655944857992 RemoteAgent TRACE Received observer notification final-ui-startup | |
| 1655944857994 RemoteAgent DEBUG Setting recommended pref datareporting.policy.dataSubmissionPolicyAccepted to false | |
| 1655944858010 CDP DEBUG Waiting for initial application window to be loaded | |
| EMITTING: emit(target-created, [object MainProcessTarget]) from registerTarget() -> chrome://remote/content/cdp/targets/TargetList.jsm:93 | |
| 1655944858352 RemoteAgent DEBUG CDPConnection cd339d5a-3ae0-4252-af01-b3a74fa889ef accepted | |
| EMITTING: emit(packet, [object Object]) from onMessage() -> chrome://remote/content/server/WebSocketTransport.jsm:87 | 
| // Cypress is pinned to 3.4.0 | |
| // npm install -d simple-git@3.4.0 | |
| const simpleGit = require('simple-git') | |
| const git = simpleGit({ baseDir: process.cwd() }) | |
| git.branch().then((b) => { | |
| console.log(b) | |
| }) |