Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Sep 11, 2025

This PR addresses inconsistencies in documentation and workflow examples for the LEVEL setting functionality in GitArmor.

Analysis

Upon investigation, the core functionality requested in issue #15 is already implemented. The LEVEL environment variable allows users to choose whether GitArmor should run repository checks after organization checks:

  • organization_only - Runs organization checks WITHOUT any repository checks
  • organization_and_repository - Runs organization checks WITH repository checks for all repos
  • repository_only - Runs repository checks only for a specified repo

Issues Found and Fixed

  1. Workflow Examples Used Incorrect Values: The GitHub Actions workflow examples were using 'repository' and 'organization' instead of the correct values 'repository_only' and 'organization_only'

  2. Incomplete Documentation: The action.yml file didn't specify the valid level values, and the README could be clearer about the behavior

  3. Build Issues: Fixed case-sensitivity issues in TypeScript imports that prevented the project from building

Changes Made

  • Updated .github/workflows/gitarmor-on-demand.yml to use correct level values and improve input description
  • Updated .github/workflows/gitarmor-scheduled.yml to use 'organization_only' instead of 'organization'
  • Enhanced action.yml to document all valid level values
  • Improved README.md with clearer explanations of each level's behavior
  • Fixed TypeScript import case sensitivity issues
  • Corrected .gitignore formatting to properly exclude dist/ directory

Verification

Created verification tests confirming:

  • organization_only does NOT run repository checks
  • organization_and_repository DOES run repository checks for all repos in the org
  • ✅ Users have full control over whether repository checks run via the LEVEL setting

The functionality requested in the issue was already present - this PR ensures the documentation and examples correctly reflect how to use it.

Fixes #15.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copy link
Author

Copilot AI commented Sep 11, 2025

@david3107 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

@Copilot Copilot AI changed the title [WIP] Allow user to select whether repo policy should run automatically after org policy execution Fix documentation and workflow examples for LEVEL setting functionality Sep 11, 2025
@Copilot Copilot AI requested a review from david3107 September 11, 2025 10:09
Copilot finished work on behalf of david3107 September 11, 2025 10:09
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.

Allow user to select whether repo policy should run automatically after org policy execution
2 participants