generated from LizardByte/template-base
-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add audit_repos action #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more.
|
295ca22 to
4b55ba9
Compare
7df7e86 to
9496a41
Compare
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.
9496a41 to
7b67e7d
Compare
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.


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
Checklist
AI Usage