Skip to content

Index GitHub Actions uses across workflows in USES.md#49

Merged
JaredHatfield merged 11 commits intomainfrom
copilot/add-uses-md-file
Feb 11, 2026
Merged

Index GitHub Actions uses across workflows in USES.md#49
JaredHatfield merged 11 commits intomainfrom
copilot/add-uses-md-file

Conversation

Copy link
Contributor

Copilot AI commented Feb 11, 2026

Adds automatic indexing of GitHub Actions uses statements across all workflow files. Generates a USES.md in the db folder that aggregates action usage by name and version, enabling version consistency tracking and coordinated updates across the organization.

Changes

Data Structures

  • ActionUse: Captures action name, version (with inline comments), and source workflow
  • ActionUsesIndex: Aggregates uses by action → version → workflow references
  • WorkflowReference: Links to specific workflow files using each version

Parsing

  • extractActionUses(): Parses workflow YAML to extract all uses statements from steps
  • parseUsesString(): Extracts action name and version, preserving inline comments (e.g., de0fac2e...83dd # v6.0.2)

Generation

  • generateUSESMarkdown(): Creates USES.md with:
    • Actions sorted alphabetically
    • Version variants with usage counts
    • Collapsible sections listing workflow files (minimizes noise)
    • Direct GitHub links to each workflow

Integration

  • Hooks into auditGitHubActions() to collect uses during workflow processing
  • Generates USES.md alongside existing index files
  • Archived repositories are skipped during scanning to avoid processing inactive repositories

Code Organization

  • All tests consolidated into single main_test.go file with organized sections for better maintainability

Example Output

## actions/checkout

**Total Usage**: 4 workflow file(s) across 3 version(s)

### Version: `de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2`

**Usage Count**: 1

<details>
<summary>Show 1 workflow file(s) using this version</summary>

- [dotgithubindexer: .github/workflows/build-go.yml](https://github.com/org/repo/blob/main/.github/workflows/build-go.yml)

</details>

See USES_EXAMPLE.md for full sample output.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 6 commits February 11, 2026 00:24
Co-authored-by: JaredHatfield <208119+JaredHatfield@users.noreply.github.com>
Co-authored-by: JaredHatfield <208119+JaredHatfield@users.noreply.github.com>
Co-authored-by: JaredHatfield <208119+JaredHatfield@users.noreply.github.com>
Co-authored-by: JaredHatfield <208119+JaredHatfield@users.noreply.github.com>
Co-authored-by: JaredHatfield <208119+JaredHatfield@users.noreply.github.com>
Co-authored-by: JaredHatfield <208119+JaredHatfield@users.noreply.github.com>
Copilot AI changed the title [WIP] Add USAGE.md file for indexing unique GitHub actions Index GitHub Actions uses across workflows in USES.md Feb 11, 2026
Copilot AI requested a review from JaredHatfield February 11, 2026 00:32
@JaredHatfield
Copy link
Member

@copilot

Combine the Go code into a single file for main.go

Additionally when scanning all of the repositories make sure you skip archived repositories.

Co-authored-by: JaredHatfield <208119+JaredHatfield@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 11, 2026

@copilot

Combine the Go code into a single file for main.go
...

Done. All test files have been consolidated into main_test.go with organized sections, and archived repositories are now skipped during scanning (see commit 571e2f7).

@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

❌ Patch coverage is 0% with 121 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.00%. Comparing base (fc88ea5) to head (60571c0).
⚠️ Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
main.go 0.00% 121 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##            main     #49    +/-   ##
======================================
  Coverage   0.00%   0.00%            
======================================
  Files          1       1            
  Lines        628     749   +121     
======================================
- Misses       628     749   +121     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JaredHatfield JaredHatfield marked this pull request as ready for review February 11, 2026 03:06
@JaredHatfield JaredHatfield merged commit 6964cdb into main Feb 11, 2026
5 checks passed
@JaredHatfield JaredHatfield deleted the copilot/add-uses-md-file branch February 11, 2026 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants