guibranco / gstraccini-bot-api

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

The API should have an endpoint to list commands in markdown and HTML format. #7

Open guibranco opened 1 month ago

guibranco commented 1 month ago

Description

The API should provide an endpoint that allows users to retrieve a list of available commands in two formats:

Rationale

  1. Consistency: Having a dedicated endpoint for listing commands ensures that the documentation can be programmatically generated and updated as new commands are introduced.
  2. Ease of Integration: Markdown and HTML are widely used formats, making it easier to embed or display commands in various platforms such as GitHub, websites, or help docs.
  3. Developer Experience: Providing this endpoint enhances the developer experience by allowing access to up-to-date command documentation directly from the API.

Expected Behavior

  1. A new endpoint, such as /commands, returns a list of commands in the requested format (markdown or html).
  2. The response should include:
    • Command name
    • Command description
    • Parameters (if applicable)
    • Examples (if available)

API Example

GET /commands?format=markdown

Sample Responses

Markdown Format

## Available Commands
### /start
- **Description**: Initializes the process.
- **Parameters**: None

### /stop
- **Description**: Stops the current process.
- **Parameters**: `force` (optional): boolean, whether to force stop.

HTML Format

<h2>Available Commands</h2>
<h3>/start</h3>
<p><strong>Description:</strong> Initializes the process.</p>
<p><strong>Parameters:</strong> None</p>

<h3>/stop</h3>
<p><strong>Description:</strong> Stops the current process.</p>
<p><strong>Parameters:</strong> <code>force</code> (optional): boolean, whether to force stop.</p>

Additional Notes

gitauto-ai[bot] commented 1 month 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.

gitauto-ai[bot] commented 5 days ago

@guibranco Pull request completed! Check it out here https://github.com/guibranco/gstraccini-bot/pull/589 🚀 Should you have any questions or wish to change settings or limits, please feel free to contact info@gitauto.ai or invite us to Slack Connect.

gitauto-ai[bot] commented 3 days ago

Hello @guibranco, you have reached your request limit of 5, your cycle will refresh on 2024-10-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.