Skip to content

Emit logs with details about configuration origin and final configuration #524

Open
@pburkholder

Description

@pburkholder

As an administrator of a GitHub organization that has delegated repoOverrides to the repository owner, I would nonetheless like to know when the org-wide settings are being overridden. I would found find it helpful if AllStar emitted logs maybe like this:

{
    "severity": "INFO",
    "org": "GSA-TTS",
    "repo": "sample_repo"
    "area": "Branch Protection",
    "enabled": true,
    "time": "2024-06-20T09:51:39-04:00",
    "message": "Check repo enabled",
    "details": {
      "configuration_sources": [
        "GSA-TTS/.allstar/branch_protection.yaml",
        "GSA-TTS/sample_repo/.allstar/branch_protection.yaml"
      ],
      "final_configuration": {
        "approvalCount": 1,
        "blockForce": true,
        "dismissStale": false,
        "enforceDefault": true,
        "enforceOnAdmins": true,
        "optOutArchivedRepos": true,
        "requireApproval": true,
        "requireSignedCommits": true,
        "requireUpToDateBranch": true
      }
    }
}

instead of the current

  {
    "severity": "INFO",
    "org": "GSA-TTS",
    "repo": "sample-repo",
    "area": "Branch Protection",
    "enabled": true,
    "time": "2024-06-20T09:51:39-04:00",
    "message": "Check repo enabled"
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions