Skip to content

Conversation

@ReenigneArcher
Copy link
Member

Description

Introduces a new composite GitHub Action, audit_repos, for auditing repositories in an organization or user account. The action checks repository descriptions and settings, provides configuration options, and includes documentation and a sample CI matrix.

Screenshot

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

@ReenigneArcher ReenigneArcher marked this pull request as draft October 11, 2025 02:09
@codecov
Copy link

codecov bot commented Oct 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (dc85c31) to head (7b67e7d).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##            master       #40    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files            3         4     +1     
  Lines          404       620   +216     
  Branches         0        57    +57     
==========================================
+ Hits           404       620   +216     
Flag Coverage Δ
Linux 100.00% <100.00%> (ø)
Windows 77.41% <100.00%> (+12.07%) ⬆️
macOS 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
actions/audit_repos/audit.js 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

@ReenigneArcher ReenigneArcher force-pushed the feat/actions/add-audit_repos-action branch 6 times, most recently from 295ca22 to 4b55ba9 Compare October 11, 2025 14:56
@ReenigneArcher ReenigneArcher marked this pull request as ready for review October 11, 2025 16:01
@ReenigneArcher ReenigneArcher force-pushed the feat/actions/add-audit_repos-action branch from 7df7e86 to 9496a41 Compare October 11, 2025 16:55
Introduces a new composite GitHub Action, audit_repos, for auditing repositories in an organization or user account. The action checks repository descriptions and settings, provides configuration options, and includes documentation and a sample CI matrix.
Enhances the audit_repos action to support validation of merge type settings, discussions configuration, and presence of community health files (README, LICENSE, CODE_OF_CONDUCT, CONTRIBUTING, SECURITY, sponsors). Updates the README and action.yml to document new inputs and usage examples, and refactors audit.js to fetch and validate these additional repository attributes.
Introduces an 'includePrivate' input to the audit_repos action, allowing users to specify whether private repositories should be included in the audit. Updates both the action.yml and audit.js to support this new option and filter repositories accordingly.
Refactored the repository audit script to extract validation and utility logic into standalone functions, improving modularity and readability. Added async checks for README, LICENSE, and FUNDING files in common locations. Enhanced repository detail fetching to support forks and organization-level community health files. The main audit function now delegates to these helpers, and the entry point is renamed for clarity.
Improved several inline comments for better clarity and consistency, including descriptions for parameters and process steps. No functional code changes were made.
Introduces a GitHub Actions workflow for running Jest tests across multiple platforms, adds ESLint configuration for code quality, and provides initial unit tests for the audit_repos action. Updates .gitignore for Node.js and Jest artifacts, and adds a package.json with relevant dev dependencies and scripts.
Merged the separate pytest and jest workflows into a single 'ci-tests.yml' workflow to streamline CI processes. The new workflow runs both Python (pytest) and Node (Jest) tests, installs dependencies for both environments, and uploads test results and coverage reports to Codecov. The old 'jest.yml' workflow file was removed.
Updated ESLint configuration to ignore files in the build directory, preventing linting of build artifacts.
Expanded test coverage for auditRepositories to include merge, squash, and rebase merge settings, repository discussions, forked repository handling, alternate file locations, and error handling for API failures. These tests improve validation of repository configuration and robustness against API errors.
Introduces helper functions to reduce duplication in audit repository tests, such as setupStandardMocks, createRepoData, and createRepoListItem. Test cases now use these helpers for setting up mock data and expectations, improving readability and maintainability.
Introduced a setupFilteringMocks helper function to reduce code duplication in repository filtering tests. This streamlines mock setup for archived, forked, and excluded repository test cases.
Introduces a setupForkedRepoMocks helper to reduce duplication in tests for forked repositories. Updates relevant tests to use the new helper, improving maintainability and readability.
Replaces repeated mock setup code in audit_repos tests with calls to setupStandardMocks for improved readability and maintainability.
Introduces the allowEmptyDescription input to optionally permit repositories without descriptions when checkDescription is enabled. Updates documentation, action.yml, audit logic, CI matrix, and tests to support and validate this new behavior.
@ReenigneArcher ReenigneArcher force-pushed the feat/actions/add-audit_repos-action branch from 9496a41 to 7b67e7d Compare October 11, 2025 17:44
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
2 Security Hotspots

See analysis details on SonarQube Cloud

@ReenigneArcher ReenigneArcher merged commit 05c79ca into master Oct 11, 2025
110 of 113 checks passed
@ReenigneArcher ReenigneArcher deleted the feat/actions/add-audit_repos-action branch October 11, 2025 18:18
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