diff --git a/src/app-store/.github/workflows/close-pull-request.yml b/src/app-store/.github/workflows/close-pull-request.yml new file mode 100644 index 00000000..c8182b84 --- /dev/null +++ b/src/app-store/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [ opened ] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/mineadmin/components repository.

This Pull Request will close automatically.

Thanks! " \ No newline at end of file diff --git a/src/jwt-auth/.github/workflows/close-pull-request.yml b/src/jwt-auth/.github/workflows/close-pull-request.yml new file mode 100644 index 00000000..c8182b84 --- /dev/null +++ b/src/jwt-auth/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [ opened ] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/mineadmin/components repository.

This Pull Request will close automatically.

Thanks! " \ No newline at end of file diff --git a/src/mine-core/.github/workflows/close-pull-request.yml b/src/mine-core/.github/workflows/close-pull-request.yml new file mode 100644 index 00000000..c8182b84 --- /dev/null +++ b/src/mine-core/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [ opened ] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/mineadmin/components repository.

This Pull Request will close automatically.

Thanks! " \ No newline at end of file diff --git a/src/mine-generator/.github/workflows/close-pull-request.yml b/src/mine-generator/.github/workflows/close-pull-request.yml new file mode 100644 index 00000000..c8182b84 --- /dev/null +++ b/src/mine-generator/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [ opened ] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/mineadmin/components repository.

This Pull Request will close automatically.

Thanks! " \ No newline at end of file diff --git a/src/mine-generator/src/ApiGenerator.php b/src/mine-generator/src/ApiGenerator.php index 385dbe60..dd5a56db 100644 --- a/src/mine-generator/src/ApiGenerator.php +++ b/src/mine-generator/src/ApiGenerator.php @@ -66,7 +66,7 @@ public function setGenInfo(GeneratorTablesContract $generatorTablesContract): Ap */ public function generator(): void { - $filename = Str::camel(str_replace(env('DB_PREFIX'), '', $this->tablesContract->getTablename())); + $filename = Str::camel(str_replace(env('DB_PREFIX', ''), '', $this->tablesContract->getTablename())); $module = Str::lower($this->tablesContract->getModuleName()); $this->filesystem->makeDirectory(BASE_PATH . "/runtime/generate/vue/src/api/{$module}", 0755, true, true); $path = BASE_PATH . "/runtime/generate/vue/src/api/{$module}/{$filename}.js"; @@ -89,7 +89,7 @@ public function getShortBusinessName(): string return Str::camel(str_replace( Str::lower($this->tablesContract->getModuleName()), '', - str_replace(env('DB_PREFIX'), '', $this->tablesContract->getTablename()) + str_replace(env('DB_PREFIX', ''), '', $this->tablesContract->getTablename()) )); } diff --git a/src/mine-generator/src/ControllerGenerator.php b/src/mine-generator/src/ControllerGenerator.php index 30c786e0..835db6a7 100644 --- a/src/mine-generator/src/ControllerGenerator.php +++ b/src/mine-generator/src/ControllerGenerator.php @@ -27,6 +27,7 @@ use Hyperf\Support\Filesystem\Filesystem; use Mine\Exception\NormalStatusException; use Mine\Generator\Contracts\GeneratorTablesContract; +use Mine\Generator\Enums\GenerateTypeEnum; use Mine\Helper\Str; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; @@ -68,7 +69,7 @@ public function setGenInfo(GeneratorTablesContract $tablesContract): ControllerG public function generator(): void { $module = Str::title($this->tablesContract->getModuleName()[0]) . mb_substr($this->tablesContract->getModuleName(), 1); - if ($this->tablesContract->getGenerateType() === 1) { + if ($this->tablesContract->getGenerateType() === GenerateTypeEnum::ZIP) { $path = BASE_PATH . "/runtime/generate/php/app/{$module}/Controller/"; } else { $path = BASE_PATH . "/app/{$module}/Controller/"; @@ -101,7 +102,7 @@ public function getType(): string */ public function getBusinessName(): string { - return Str::studly(str_replace(env('DB_PREFIX'), '', $this->tablesContract->getTableName())); + return Str::studly(str_replace(env('DB_PREFIX', ''), '', $this->tablesContract->getTableName())); } /** @@ -112,7 +113,7 @@ public function getShortBusinessName(): string return Str::camel(str_replace( Str::lower($this->tablesContract->getModuleName()), '', - str_replace(env('DB_PREFIX'), '', $this->tablesContract->getTableName()) + str_replace(env('DB_PREFIX', ''), '', $this->tablesContract->getTableName()) )); } diff --git a/src/mine-helpers/.github/workflows/close-pull-request.yml b/src/mine-helpers/.github/workflows/close-pull-request.yml new file mode 100644 index 00000000..c8182b84 --- /dev/null +++ b/src/mine-helpers/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [ opened ] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/mineadmin/components repository.

This Pull Request will close automatically.

Thanks! " \ No newline at end of file diff --git a/src/mine-service/.github/workflows/close-pull-request.yml b/src/mine-service/.github/workflows/close-pull-request.yml new file mode 100644 index 00000000..c8182b84 --- /dev/null +++ b/src/mine-service/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [ opened ] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/mineadmin/components repository.

This Pull Request will close automatically.

Thanks! " \ No newline at end of file diff --git a/src/next-core-x/.github/workflows/close-pull-request.yml b/src/next-core-x/.github/workflows/close-pull-request.yml new file mode 100644 index 00000000..c8182b84 --- /dev/null +++ b/src/next-core-x/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [ opened ] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/mineadmin/components repository.

This Pull Request will close automatically.

Thanks! " \ No newline at end of file diff --git a/src/office/.github/workflows/close-pull-request.yml b/src/office/.github/workflows/close-pull-request.yml new file mode 100644 index 00000000..c8182b84 --- /dev/null +++ b/src/office/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [ opened ] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/mineadmin/components repository.

This Pull Request will close automatically.

Thanks! " \ No newline at end of file diff --git a/src/translatable/.github/workflows/close-pull-request.yml b/src/translatable/.github/workflows/close-pull-request.yml new file mode 100644 index 00000000..c8182b84 --- /dev/null +++ b/src/translatable/.github/workflows/close-pull-request.yml @@ -0,0 +1,13 @@ +name: Close Pull Request + +on: + pull_request_target: + types: [ opened ] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/mineadmin/components repository.

This Pull Request will close automatically.

Thanks! " \ No newline at end of file