GitHubSettingsSync 3.0.0
dotnet tool install --global GitHubSettingsSync --version 3.0.0
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo dotnet tool install --local GitHubSettingsSync --version 3.0.0
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=GitHubSettingsSync&version=3.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package GitHubSettingsSync --version 3.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
GitHubSettingsSync
This is an application to synchronize GitHub settings.
説明
GitHubSettingsSync is an application for configuring GitHub repository settings.
Usage
Action
on:
workflow_dispatch:
jobs:
sync-github-settings:
runs-on: ubuntu-latest
steps:
- name: GitHub Settings Sync
uses: finphie/GitHubSettingsSync@v3.0.0
with:
repository: GitHubSettingsSync
path: github-settings.json
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
.NET tool
GitHubSettingsSync \
--repository GitHubSettingsSync \
--path github-settings.json
Arguments
Argument | Required | Default | Description |
---|---|---|---|
repository | true | - | "owner/repo" format repository name. |
path | true | - | File path of the configuration file. |
Environment Variables
Variable Name | Required | Default | Description |
---|---|---|---|
GITHUB_TOKEN | true | - | Token with write permission to Administration. |
Configuration File
The file is in JSON format. By setting the value to null
or omitting the key, the setting will be retained without changes.
Configuration Example
{
"repository": {
"security_and_analysis": {
"secret_scanning": {
"status": "disabled"
},
"secret_scanning_push_protection": {
"status": "disabled"
}
},
"has_issues": true,
"has_projects": true,
"has_wiki": true,
"has_discussions": true,
"allow_merge_commit": true,
"allow_squash_merge": true,
"allow_rebase_merge": true,
"allow_auto_merge": false,
"delete_branch_on_merge": false,
"allow_update_branch": false,
"merge_commit_title": "MERGE_MESSAGE",
"merge_commit_message": "PR_TITLE",
"squash_merge_commit_title": "COMMIT_OR_PR_TITLE",
"squash_merge_commit_message": "COMMIT_MESSAGES"
},
"branches": [
{
"name": "main",
"branch_protection": {
"enforce_admins": false,
"required_linear_history": false,
"allow_force_pushes": false,
"allow_deletions": false,
"required_conversation_resolution": false,
"required_pull_request_reviews": {
"dismiss_stale_reviews": false,
"require_code_owner_reviews": false,
"required_approving_review_count": 0,
"require_last_push_approval": false
}
}
}
]
}
Configuration Details
repository
Key | Required | Default | Description |
---|---|---|---|
has_issues | false | null | Enable or disable Issues. |
has_projects | false | null | Enable or disable Projects. |
has_wiki | false | null | Enable or disable Wiki. |
has_discussions | false | null | Enable or disable Discussions. |
allow_merge_commit | false | null | Enable or disable "Create a merge commit". |
allow_squash_merge | false | null | Enable or disable "Squash Merge". |
allow_rebase_merge | false | null | Enable or disable "Rebase and Merge". |
allow_auto_merge | false | null | Enable or disable auto-merge feature. |
delete_branch_on_merge | false | null | Automatically delete branch after pull request merge. |
allow_update_branch | false | null | Enable or disable "Update branch". |
merge_commit_title | false | null | Type of commit title for merge. Either PR_TITLE or MERGE_MESSAGE. If PR_TITLE, specify PR_BODY or BLANK for merge_commit_message. If MERGE_MESSAGE, specify PR_TITLE for merge_commit_message. |
merge_commit_message | false | null | Type of commit message for merge. Either PR_TITLE, PR_BODY, or BLANK. |
squash_merge_commit_title | false | null | Type of commit title for squash merge. Either PR_TITLE or COMMIT_OR_PR_TITLE. If PR_TITLE, specify PR_BODY, COMMIT_MESSAGES, or BLANK for squash_merge_commit_message. If COMMIT_OR_PR_TITLE, specify COMMIT_MESSAGES. |
squash_merge_commit_message | false | null | Type of commit message for squash merge. Either PR_BODY, COMMIT_MESSAGES, or BLANK. |
security_and_analysis
Key | Required | Default | Description |
---|---|---|---|
secret_scanning.status | false | null | Enable or disable secret scanning. Either enabled or disabled. |
secret_scanning_push_protection.status | false | null | Enable or disable secret scanning push protection. Either enabled or disabled. |
branches
Key | Required | Default | Description |
---|---|---|---|
name | true | - | Branch name. |
branch_protection
Key | Required | Default | Description |
---|---|---|---|
enforce_admins | false | null | Apply branch protection to administrators. |
required_linear_history | false | null | Require linear history. |
allow_force_pushes | false | null | Allow force pushes. |
allow_deletions | false | null | Allow users with push access to delete the protected branch. |
required_conversation_resolution | false | null | Require conversation resolution before merging. |
required_reviews | false | null | Require reviews before merging. |
dismiss_stale_reviews | false | null | Dismiss approved reviews when new commits are pushed. |
require_code_owner_reviews | false | null | Require reviews from code owners. |
required_approving_review_count | false | null | Number of reviewers required to approve a pull request. |
require_last_push_approval | false | null | Require approval from someone other than the user who made the last push. |
Author
finphie
License
MIT
Credits
This project uses the following libraries, etc.
Libraries
Analyzers
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.