guibranco / gstraccini-bot

🤖 :octocat: GStraccini-bot automates repository management, ensuring organization and health by handling pull requests, issues, comments, and commits.
https://bot.straccini.com
MIT License
2 stars 0 forks source link

The API should have an endpoint to list actual settings. #543

Open guibranco opened 6 days ago

guibranco commented 6 days ago

Description

The API should provide an endpoint that allows users to retrieve a list of the current or "actual" settings that are actively being applied. This endpoint will offer an overview of the system’s current configuration, providing key settings and their respective values.

Rationale

  1. Configuration Visibility: Access to actual settings allows users and administrators to see the currently applied configurations in real-time, helping with diagnostics and system monitoring.
  2. Consistency: Ensures users and applications can programmatically fetch the exact settings being used, eliminating confusion about potential differences between stored and applied settings.
  3. Auditing and Monitoring: This feature enables automation in auditing settings, ensuring compliance with organizational policies.
  4. Troubleshooting: Having an endpoint that exposes active settings helps identify misconfigurations or unintended changes.

Expected Behavior

  1. A new endpoint, such as /actual-settings, returns a JSON object of all currently applied settings.
  2. The response should include:
    • Setting name
    • Value
    • Category or section (if applicable)
    • Timestamp of the last update (optional)

API Example

GET /actual-settings

Sample Response

{
  "settings": [
    {
      "name": "owner",
      "value": "guibranco",
      "category": "github",
      "last_updated": "2024-09-12T14:25:00Z"
    },
    {
      "name": "botname",
      "value": "gstraccini",
      "category": "system",
      "last_updated": "2024-09-10T09:15:00Z"
    }
  ]
}

Additional Notes

gitauto-ai[bot] commented 6 days ago

Hello @guibranco, you have reached your request limit of 5, your cycle will refresh on 2024-09-21 10:07:38+00:00. Consider subscribing if you want more requests. If you have any questions or concerns, please contact us at info@gitauto.ai.