diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..8949052 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,11 @@ +# Add 'feature' label to any PR where the head branch name starts with `feature` or has a `feature` section in the name +feature: +- head-branch: ['^feature', 'feature'] + +# Add 'bug' label to any PR where the head branch name starts with `bug` or has a `bug` section in the name +bug: +- head-branch: ['^bug', 'bug'] + +# Add 'docs' label to any PR where the head branch name starts with `docs` or has a `docs` section in the name +docs: +- head-branch: ['^docs', 'docs'] diff --git a/.github/workflows/labeler.yaml b/.github/workflows/labeler.yaml new file mode 100644 index 0000000..373948c --- /dev/null +++ b/.github/workflows/labeler.yaml @@ -0,0 +1,12 @@ +name: "labeler" +on: + - pull_request_target + +jobs: + labeler: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5.0.0 diff --git a/.struct.yaml b/.struct.yaml index 9501e41..3b064c2 100644 --- a/.struct.yaml +++ b/.struct.yaml @@ -4,5 +4,6 @@ folders: - github/prompts/struct - github/workflows/pre-commit - github/workflows/release-drafter + - github/workflows/labeler - configs/prettier - configs/editor-config diff --git a/struct_module/contribs/github/chatmodes/plan.yaml b/struct_module/contribs/github/chatmodes/plan.yaml new file mode 100644 index 0000000..deb46c3 --- /dev/null +++ b/struct_module/contribs/github/chatmodes/plan.yaml @@ -0,0 +1,18 @@ +files: + - ./github/chatmodes/plan.chatmode.md: + content: | + --- + description: Generate an implementation plan for new features or refactoring existing code. + tools: ['codebase', 'fetch', 'findTestFiles', 'githubRepo', 'search', 'usages'] + model: Claude Sonnet 4 + --- + # Planning mode instructions + You are in planning mode. Your task is to generate an implementation plan for a new feature or for refactoring existing code. + Don't make any code edits, just generate a plan. + + The plan consists of a Markdown document that describes the implementation plan, including the following sections: + + * Overview: A brief description of the feature or refactoring task. + * Requirements: A list of requirements for the feature or refactoring task. + * Implementation Steps: A detailed list of steps to implement the feature or refactoring task. + * Testing: A list of tests that need to be implemented to verify the feature or refactoring task. diff --git a/struct_module/contribs/github/workflows/labeler.yaml b/struct_module/contribs/github/workflows/labeler.yaml index 95f3b24..811f74e 100644 --- a/struct_module/contribs/github/workflows/labeler.yaml +++ b/struct_module/contribs/github/workflows/labeler.yaml @@ -1,58 +1,66 @@ files: - .github/labeler.yml: - content: | - # Add 'root' label to any root file changes - # Quotation marks are required for the leading asterisk - root: - - changed-files: - - any-glob-to-any-file: '*' - - # Add 'AnyChange' label to any changes within the entire repository - AnyChange: - - changed-files: - - any-glob-to-any-file: '**' + content: | + # Add 'root' label to any root file changes + # Quotation marks are required for the leading asterisk + root: + - changed-files: + - any-glob-to-any-file: '*' - # Add 'Documentation' label to any changes within 'docs' folder or any subfolders - Documentation: - - changed-files: - - any-glob-to-any-file: docs/** + # Add 'AnyChange' label to any changes within the entire repository + AnyChange: + - changed-files: + - any-glob-to-any-file: '**' - # Add 'Documentation' label to any file changes within 'docs' folder - Documentation: - - changed-files: - - any-glob-to-any-file: docs/* + # Add 'Documentation' label to any changes within 'docs' folder or any subfolders + Documentation: + - changed-files: + - any-glob-to-any-file: docs/** - # Add 'Documentation' label to any file changes within 'docs' or 'guides' folders - Documentation: - - changed-files: - - any-glob-to-any-file: - - docs/* - - guides/* + # Add 'Documentation' label to any file changes within 'docs' folder + Documentation: + - changed-files: + - any-glob-to-any-file: docs/* - ## Equivalent of the above mentioned configuration using another syntax - Documentation: - - changed-files: - - any-glob-to-any-file: ['docs/*', 'guides/*'] + # Add 'Documentation' label to any file changes within 'docs' or 'guides' folders + Documentation: + - changed-files: + - any-glob-to-any-file: + - docs/* + - guides/* - # Add 'Documentation' label to any change to .md files within the entire repository - Documentation: - - changed-files: - - any-glob-to-any-file: '**/*.md' + ## Equivalent of the above mentioned configuration using another syntax + Documentation: + - changed-files: + - any-glob-to-any-file: ['docs/*', 'guides/*'] - # Add 'source' label to any change to src files within the source dir EXCEPT for the docs sub-folder - source: - - all: + # Add 'Documentation' label to any change to .md files within the entire repository + Documentation: - changed-files: - - any-glob-to-any-file: 'src/**/*' - - all-globs-to-all-files: '!src/docs/*' + - any-glob-to-any-file: '**/*.md' + + # Add 'source' label to any change to src files within the source dir EXCEPT for the docs sub-folder + source: + - all: + - changed-files: + - any-glob-to-any-file: 'src/**/*' + - all-globs-to-all-files: '!src/docs/*' + + # Add 'feature' label to any PR where the head branch name starts with `feature` or has a `feature` section in the name + feature: + - head-branch: ['^feature', 'feature'] + + # Add 'release' label to any PR that is opened against the `{{@ current_repo() | default_branch @}}` branch + release: + - base-branch: '{{@ current_repo() | default_branch @}}' - # Add 'feature' label to any PR where the head branch name starts with `feature` or has a `feature` section in the name - feature: - - head-branch: ['^feature', 'feature'] + # Add 'bug' label to any PR where the head branch name starts with `bug` or has a `bug` section in the name + bug: + - head-branch: ['^bug', 'bug'] - # Add 'release' label to any PR that is opened against the `{{@ current_repo() | default_branch @}}` branch - release: - - base-branch: '{{@ current_repo() | default_branch @}}' + # Add 'docs' label to any PR where the head branch name starts with `docs` or has a `docs` section in the name + docs: + - head-branch: ['^docs', 'docs'] - .github/workflows/labeler.yaml: content: | name: "labeler" diff --git a/struct_module/contribs/project/custom-structures.yaml b/struct_module/contribs/project/custom-structures.yaml new file mode 100644 index 0000000..f93f32a --- /dev/null +++ b/struct_module/contribs/project/custom-structures.yaml @@ -0,0 +1,24 @@ +files: + - README.md: + content: | + # Custom Struct Structures + - custom-mappings.yaml: + content: | + # Custom Struct Mappings + # This file defines custom mappings for the Struct. + mappings: + aws_account_ids: + nonprod: "123456789012" + prod: "987654321098" + + - structures/.gitkeep: + content: "" +folders: + - ./: + struct: + - configs/devcontainer + - configs/editor-config + - configs/prettier + - github/workflows/run-struct + - github/workflows/release-drafter + - github/workflows/pre-commit