PHP code example of argus-cs / redmine-message

1. Go to this page and download the library: Download argus-cs/redmine-message library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

argus-cs / redmine-message example snippets


use ArgusCS\RedmineMessage\Services\RedmineClient;

$redmine = new RedmineClient();
$task = $redmine->task('12345', 'issue'); // retorna a chave 'issue' do JSON

$redmine->addTaskNote('12345', "Mensagem gerada automaticamente...");

use ArgusCS\RedmineMessage\Services\GitClient;

$git = new GitClient();
$diff = $git->diff(); // por padrão '--staged'
$branch = trim($git->nameBranch());

use ArgusCS\RedmineMessage\Services\GeminiClient;

$gemini = new GeminiClient();
$response = $gemini->generate($prompt);
$text = $response->json('candidates.0.content.parts.0.text');
bash
php artisan vendor:publish --tag=messages
bash
php artisan gen:redmine-message