{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":739075226,"defaultBranch":"main","name":"ops","ownerLogin":"luzmcosta","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2024-01-04T17:59:43.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/960173?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1710445233.0","currentOid":""},"activityList":{"items":[{"before":"67789e1681a12012fb62c70077e118ee40a90e86","after":"e2f4e5beae7bcf371220933ddee7eb112d1d3a06","ref":"refs/heads/dev","pushedAt":"2024-03-14T21:12:03.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"luzmcosta","name":"Luz M. Costa","path":"/luzmcosta","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/960173?s=80&v=4"},"commit":{"message":"Remove irrelevant dependencies\n\nThese changes remove the `npm` and `install` packages from our list of `devDependencies` in the package.json file. These packages made their way into the `devDependencies` list via an errant command execution.\n\nThis is related to some recent terminal incidents I've experienced, where my terminal froze and crashed while I was typing. It seems I accidentally executed `npm install npm install` during my struggle with the terminal. Because the command is technically well-formed, rather than err, it installed the `npm` and `install` packages.\n\nThankfully, I caught this issue as part of the pull request review. As such, this incident demonstrates the importance of reviewing dependencies regularly, especially before a pull request is merged into the `main` branch.","shortMessageHtmlLink":"Remove irrelevant dependencies"}},{"before":null,"after":"67789e1681a12012fb62c70077e118ee40a90e86","ref":"refs/heads/dev","pushedAt":"2024-03-14T19:40:33.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"luzmcosta","name":"Luz M. Costa","path":"/luzmcosta","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/960173?s=80&v=4"},"commit":{"message":"Document, test, and refactor our modules\n\nAs part of testing the ops module's functionality, the following changes are proposed:\n\n- Introduce and configure Jest, using `src` as the `rootDir` property. Alongside the introduction of the usual `jest.config.mjs` file, I've added a `jest.env.js` file and set it as the `setupFiles` property of the `jest.config.mjs`. The setup file is needed to configure the `process.env.NODE_ENV` env var for tests that reference or update its value. Similarly, I've added the `jest.utils.js` file to hold our various setup and teardown functions in one place.\n- Add a `test` command to the package.json scripts. The command runs Jest with the `--experimental-vm-modules` flag they currently recommend using to support ES modules.\n- Introduce and configure ESLint. I've started with some basic rules we can iterate upon from here.\n- Introduce an `OPS_EMAIL` environment variable and update `.env.example` accordingly. The env var allows a dev user to set the email address the script should use when logging in to Firebase and other services.\n- Refactor modules and functions into smaller blocks, each with a single responsibility. In so doing, new modules were introduced, including `env`, `exec`, `firebase`, and `validate`.\n- Facilitate testing and future iterations by writing functions that support dependency injection. This is a pattern that should be upheld as this repo matures.\n- Unit test over 80% of statements, functions, lines, and the branch. This goal was attained and surpassed. Details have been included below.\n\n## Test Results\n\nBelow are the tests results these changes produce.\n\n PASS src/ops.test.js\n PASS src/firebase.test.js\n PASS src/logger.test.js\n PASS src/validate.test.js\n PASS src/gcloud.test.js\n PASS src/exec.test.js\n-------------|---------|----------|---------|---------|------------------------------------\nFile | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s\n-------------|---------|----------|---------|---------|------------------------------------\nAll files | 95.68 | 96.47 | 86.56 | 95.68 |\n env.js | 100 | 50 | 100 | 100 | 11\n exec.js | 98.01 | 91.66 | 66.66 | 98.01 | 59-60\n firebase.js | 96.43 | 100 | 80.95 | 96.43 | 453-470\n gcloud.js | 100 | 100 | 100 | 100 |\n logger.js | 100 | 100 | 100 | 100 |\n ops.js | 90.64 | 90.9 | 77.77 | 90.64 | ...331-338,343-352,365,378,389,396\n validate.js | 100 | 100 | 100 | 100 |\n-------------|---------|----------|---------|---------|------------------------------------\n\nTest Suites: 6 passed, 6 total\nTests: 113 passed, 113 total\nSnapshots: 0 total\nTime: 7.761 s, estimated 10 s\nRan all test suites.","shortMessageHtmlLink":"Document, test, and refactor our modules"}},{"before":"ee417293fe319c8b6dcbfabe4f795fae5f250e20","after":"89366b40de2ac3f435520487cf168677f9275252","ref":"refs/heads/main","pushedAt":"2024-02-04T20:40:45.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"luzmcosta","name":"Luz M. Costa","path":"/luzmcosta","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/960173?s=80&v=4"},"commit":{"message":"Run `firebase init` to complete the Firebase setup\n\nThese changes are the result of running `firebase init` and\nselecting the ops-js Firebase project. The default settings\nwere used whenever possible, so the only emulator configured\nwas the Authentication emulator. Developers should re-run the\n`firebase init` command to configure the other emulators as\nneeded.","shortMessageHtmlLink":"Run firebase init to complete the Firebase setup"}},{"before":"aa18e13e6f04c07541ca901d8faa91c1bc3bf55a","after":"ee417293fe319c8b6dcbfabe4f795fae5f250e20","ref":"refs/heads/main","pushedAt":"2024-02-04T20:12:50.000Z","pushType":"push","commitsCount":3,"pusher":{"login":"luzmcosta","name":"Luz M. Costa","path":"/luzmcosta","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/960173?s=80&v=4"},"commit":{"message":"Document what OpsJS is and how to use it\n\nUpdate the README with a description of the project, followed by\ninstructions on how to configure, install, run, and confirm the\noutput of the ops script.","shortMessageHtmlLink":"Document what OpsJS is and how to use it"}},{"before":"ad1126721e8cc1a73bcb802e425d1fe4e7bcb7ae","after":"aa18e13e6f04c07541ca901d8faa91c1bc3bf55a","ref":"refs/heads/main","pushedAt":"2024-02-04T18:46:02.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"luzmcosta","name":"Luz M. Costa","path":"/luzmcosta","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/960173?s=80&v=4"},"commit":{"message":"Run `npm install` after creating a dev container\n\nThis change executes `npm install` after the container is\ncreated, thereby removing one more manual step from the\nprocess of setting up the development environment.","shortMessageHtmlLink":"Run npm install after creating a dev container"}},{"before":"0153c15bbbc369d88dd65a4a674706a3d6bbc801","after":"ad1126721e8cc1a73bcb802e425d1fe4e7bcb7ae","ref":"refs/heads/main","pushedAt":"2024-02-04T01:27:29.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"luzmcosta","name":"Luz M. Costa","path":"/luzmcosta","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/960173?s=80&v=4"},"commit":{"message":"Introduce basic .firebaserc","shortMessageHtmlLink":"Introduce basic .firebaserc"}},{"before":"02e4be706d823bc7284506c5a783657ccb9ad15c","after":"0153c15bbbc369d88dd65a4a674706a3d6bbc801","ref":"refs/heads/main","pushedAt":"2024-02-04T01:24:21.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"luzmcosta","name":"Luz M. Costa","path":"/luzmcosta","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/960173?s=80&v=4"},"commit":{"message":"Fix \"command not found\" at install of ops CLI\n\nThe ops CLI failed install via `npm run ops`. This was due to the\nmissing `bin` property in `package.json`, plus the file system\npermissions of the `src/ops.js` file.\n\nIn the case of the former, the `bin` property was added to\n`package.json` with the path to the `src/ops.js` file. This\nexposed the `ops` command to the system.\n\nIn the case of the latter, the file was not executable, so the\n`ops` command was not found. Setting the file permissions to\n`755` fixed the issue.","shortMessageHtmlLink":"Fix \"command not found\" at install of ops CLI"}},{"before":"b67f9fef18f8055b53a1854801825763a6ff6cb0","after":"02e4be706d823bc7284506c5a783657ccb9ad15c","ref":"refs/heads/main","pushedAt":"2024-02-04T01:03:59.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"luzmcosta","name":"Luz M. Costa","path":"/luzmcosta","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/960173?s=80&v=4"},"commit":{"message":"Refactor to prevent scope issues","shortMessageHtmlLink":"Refactor to prevent scope issues"}},{"before":"477db79c2617bc9e9d7104a8528fcd46d0afdf1c","after":"b67f9fef18f8055b53a1854801825763a6ff6cb0","ref":"refs/heads/main","pushedAt":"2024-02-04T00:56:24.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"luzmcosta","name":"Luz M. Costa","path":"/luzmcosta","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/960173?s=80&v=4"},"commit":{"message":"Draft a CLI to simplify complex dev ops tasks for a repo.\n\nThis commit drafts a CLI to simplify complex dev ops tasks,\nspecifically environment setup. To use the CLI, execute the `ops`\nscript defined in the `package.json` file.\n\nThe CLI uses a logger module to display messages to the console.\nThe logger module is defined in the `src/logger.js` file and\ntested in the `src/logger.test.js` file.\n\nThe CLI also uses a `.env` file to store environment variables.\nAn example `.env` file is provided in the `.env.example` file.","shortMessageHtmlLink":"Draft a CLI to simplify complex dev ops tasks for a repo."}},{"before":"73dcb6ce8551a8e50d8d1aa89ed16b2414993690","after":"477db79c2617bc9e9d7104a8528fcd46d0afdf1c","ref":"refs/heads/main","pushedAt":"2024-01-04T18:42:40.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"luzmcosta","name":"Luz M. Costa","path":"/luzmcosta","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/960173?s=80&v=4"},"commit":{"message":"Configure GitHub Codespaces with devcontainer.json\n\nThis commit uses a devcontainer.json file to configure GitHub\nCodespaces with the desired CLIs. The base image makes `node`\nand `npm` available, while the `features` section installs\nthe `gcloud` and `firebase` CLIs.","shortMessageHtmlLink":"Configure GitHub Codespaces with devcontainer.json"}},{"before":null,"after":"73dcb6ce8551a8e50d8d1aa89ed16b2414993690","ref":"refs/heads/main","pushedAt":"2024-01-04T17:59:43.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"luzmcosta","name":"Luz M. Costa","path":"/luzmcosta","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/960173?s=80&v=4"},"commit":{"message":"Initial commit","shortMessageHtmlLink":"Initial commit"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"startCursor":"Y3Vyc29yOnYyOpK7MjAyNC0wMy0xNFQyMToxMjowMy4wMDAwMDBazwAAAAQWGV6G","endCursor":"Y3Vyc29yOnYyOpK7MjAyNC0wMS0wNFQxNzo1OTo0My4wMDAwMDBazwAAAAPX7mU2"}},"title":"Activity ยท luzmcosta/ops"}