POC WIP detectaffectedgopackages
Below is a summarization created by an LLM (gpt-4-0125-preview). Be mindful of hallucinations and verify accuracy.
Why
The changes introduce a new tool named detectaffectedgopackages to the project. This tool is designed to identify Go packages affected by code changes by analyzing the git diff output. It enhances the development process by automating the detection of affected packages, which is crucial for optimizing build times and ensuring targeted testing. The addition of this tool to the workflow and test configurations ensures that it integrates seamlessly with the existing CI/CD pipeline, facilitating its usage during development and review processes.
What
.github/workflows/release-tools.yaml- Added
tools/detectaffectedgopackagesto thetoolmatrix for release automation.
- Added
.github/workflows/test.yaml- Included
tools/detectaffectedgopackagesin thematrix.projectto ensure it undergoes testing along with other project components.
- Included
tools/detectaffectedgopackages/Makefile- New file to define build and test instructions for the
detectaffectedgopackagestool.
- New file to define build and test instructions for the
tools/detectaffectedgopackages/go.modandtools/detectaffectedgopackages/go.sum- New Go module definition and checksums for managing dependencies specific to the new tool.
tools/detectaffectedgopackages/main.go- Main application code for
detectaffectedgopackages, handling git diffs to detect changes in Go packages.
- Main application code for
tools/detectaffectedgopackages/main_test.go- Test suite for the
detectaffectedgopackagestool to ensure correct functionality.
- Test suite for the
tools/detectaffectedgopackages/package.json- Metadata file describing the
detectaffectedgopackagestool, marking its version and description.
- Metadata file describing the
tools/detectaffectedgopackages/testdata/gitdiff.txt,tools/detectaffectedgopackages/testdata/gitdiffmod.txt, andtools/detectaffectedgopackages/testdata/golist.txt- Test data files used in the test suite for simulating various git and go list command outputs.
closing as @lukaszcl will create his own tool to detect blast radius

