Commit ff7e802b by Tấn Trần Thanh

config for set up github token

parent b77fc250
Pipeline #1618 canceled with stages
in 0 seconds
/config/application.yml
\ No newline at end of file
= workflow_report
This plugin is designed to produce monthly workflow reports with precise customization options. Users can select a specific month, year, and team of interest. Upon making these selections, the plugin generates a detailed report that is exclusively based on the chosen month and year.
To install and configure the Workflow Report plugin for Redmine, follow these steps:
1. Navigate to the plugin's configuration directory:
cd plugins/workflow_report/config
2. Create the `application.yml` configuration file based on the example:
- Copy the contents from `application.yml.example` into a new file named `application.yml`.
- You can use the following command to do this quickly:
cp application.yml.example application.yml
3. Add your GitHub Token to the configuration file:
- Open the `application.yml` file in your text editor.
- Locate the line that reads `github_token:` and add your GitHub token after the colon. For example:
github_token: your_github_token_here
- Note: Replace `your_github_token_here` with your actual GitHub token.
github_token: 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
teams:
- Kyujin:
- 9
......
......@@ -12,7 +12,9 @@ Redmine::Plugin.register :workflow_report do
url 'http://example.com/path/to/plugin'
author_url 'http://example.com/about'
configfile = File.join(File.dirname(__FILE__), 'config', 'settings.yml')
application_config = File.join(File.dirname(__FILE__), 'config', 'application.yml')
$workflow_report_config = YAML::load_file(configfile)
$app_report_config = YAML::load_file(application_config)
end
Redmine::MenuManager.map :top_menu do |menu|
......
......@@ -17,7 +17,7 @@ module WorkflowReport
class << self
def build_report(year, month, project_ids)
github = Github.new oauth_token: $workflow_report_config['github_token']
github = Github.new oauth_token: $app_report_config['github_token']
error_links = []
work_queue = Queue.new
result = TABLE_HEADER.length.times.map { [] }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment