-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from alalkamys/feat/dynamic-configuration
Feat: Actor Identity Config is Now Dynamic
- Loading branch information
Showing
2 changed files
with
17 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ With `Code Migration Assistant` teams can accelerate the migration of code repos | |
## Table of contents | ||
|
||
<!--ts--> | ||
|
||
- [Code Migration Assistant](#code-migration-assistant) | ||
- [Table of contents](#table-of-contents) | ||
- [Key Features](#key-features) | ||
|
@@ -34,7 +35,6 @@ With `Code Migration Assistant` teams can accelerate the migration of code repos | |
- [Environment Variables](#environment-variables) | ||
- [⚔️ Developed By](#️-developed-by) | ||
- [:book: Author](#book-author) | ||
<!--te--> | ||
|
||
## Key Features | ||
|
||
|
@@ -216,7 +216,7 @@ Below is an explanation of each field in the configuration file: | |
|
||
### `targetBranch` (Optional) | ||
|
||
- **Description**: Specifies the target branch for the pull request. | ||
- **Description**: Specifies the target branch on which the replacements will occur and will be the source branch for your pull requests. | ||
- **Fields**: | ||
- `name` (required): Name of the target branch. | ||
- `from` (Optional): Source branch from which the target branch is created. | ||
|
@@ -286,16 +286,18 @@ Below is an explanation of each field in the configuration file: | |
|
||
## Environment Variables | ||
|
||
| Environment Variable | Usage | Default Value | | ||
| ------------------------------------------------------ | ------------------------------------------------------------------------- | ------------------------------------ | | ||
| `CODE_MIGRATION_ASSISTANT_APP_NAME` | Name of the Code Migration Assistant application | `code_migration_assistant` | | ||
| `CODE_MIGRATION_ASSISTANT_LOG_LEVEL` | Log level for the Code Migration Assistant application | `INFO` | | ||
| `CODE_MIGRATION_ASSISTANT_TARGETS_CONFIG_FILE` | Path to the targets configuration file for Code Migration Assistant | `./config.json` | | ||
| `CODE_MIGRATION_ASSISTANT_REMOTE_TARGETS_CLONING_PATH` | Path where remote repositories will be cloned by Code Migration Assistant | `./remote-targets` | | ||
| `AZURE_DEVOPS_PAT` | Azure DevOps Personal Access Token (PAT) | `None` | | ||
| `GITHUB_TOKEN` | GitHub Personal Access Token (PAT) | `None` | | ||
| `GITHUB_ENTERPRISE_TOKEN` | GitHub Enterprise Personal Access Token (PAT) | `None` | | ||
| `CODE_MIGRATION_ASSISTANT_USER_AGENT` | User agent used for HTTP requests by Code Migration Assistant | `alalkamys/code-migration-assistant` | | ||
| Environment Variable | Usage | Default Value | | ||
| ------------------------------------------------------ | ------------------------------------------------------------------------- | ------------------------------------------ | | ||
| `CODE_MIGRATION_ASSISTANT_APP_NAME` | Name of the Code Migration Assistant application | `code_migration_assistant` | | ||
| `CODE_MIGRATION_ASSISTANT_LOG_LEVEL` | Log level for the Code Migration Assistant application | `INFO` | | ||
| `CODE_MIGRATION_ASSISTANT_TARGETS_CONFIG_FILE` | Path to the targets configuration file for Code Migration Assistant | `./config.json` | | ||
| `CODE_MIGRATION_ASSISTANT_REMOTE_TARGETS_CLONING_PATH` | Path where remote repositories will be cloned by Code Migration Assistant | `./remote-targets` | | ||
| `AZURE_DEVOPS_PAT` | Azure DevOps Personal Access Token (PAT) | `None` | | ||
| `GITHUB_TOKEN` | GitHub Personal Access Token (PAT) | `None` | | ||
| `GITHUB_ENTERPRISE_TOKEN` | GitHub Enterprise Personal Access Token (PAT) | `None` | | ||
| `CODE_MIGRATION_ASSISTANT_USER_AGENT` | User agent used for HTTP requests by Code Migration Assistant | `alalkamys/code-migration-assistant` | | ||
| `CODE_MIGRATION_ASSISTANT_ACTOR_USERNAME` | Actor username used for git identity setup | `Code Migration Assistant Agent` | | ||
| `CODE_MIGRATION_ASSISTANT_ACTOR_EMAIL` | Actor email used for git identity setup | `[email protected]` | | ||
|
||
<br /> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ class AppConfig: | |
AZURE_DEVOPS_PAT (str): The Personal Access Token (PAT) for Azure DevOps. Defaults to None. | ||
GITHUB_TOKEN (str): The Personal Access Token (PAT) for GitHub. Defaults to None. | ||
GITHUB_ENTERPRISE_TOKEN (str): The Personal Access Token (PAT) for GitHub Enterprise. Defaults to None. | ||
ACTOR (dict): A dictionary containing the username and email of the application's agent. | ||
ACTOR (dict): A dictionary containing the username and email of the application's agent. Defaults to {'username': "Code Migration Assistant Agent", 'email': "[email protected]"} | ||
USER_AGENT (str): The user agent for making HTTP requests. Defaults to "alalkamys/code-migration-assistant". | ||
LOGGING_CONFIG (dict): Configuration settings for logging. | ||
""" | ||
|
@@ -66,8 +66,8 @@ class AppConfig: | |
GITHUB_ENTERPRISE_TOKEN = os.getenv('GITHUB_ENTERPRISE_TOKEN', None) | ||
|
||
ACTOR = { | ||
'username': "Code Migration Assistant Agent", | ||
'email': '[email protected]' | ||
'username': os.getenv('CODE_MIGRATION_ASSISTANT_ACTOR_USERNAME', "Code Migration Assistant Agent"), | ||
'email': os.getenv('CODE_MIGRATION_ASSISTANT_ACTOR_EMAIL', "[email protected]") | ||
} | ||
|
||
USER_AGENT = os.getenv( | ||
|