From f3a45dacaa9621e0d21dec55164f8adc9838da92 Mon Sep 17 00:00:00 2001 From: Joe <104938042+lrljoe@users.noreply.github.com> Date: Sun, 5 Nov 2023 22:51:05 +0000 Subject: [PATCH 1/6] Doctum Specific Configuration --- .gitattributes | 37 ++++---- .github/workflows/build-doctum-docs.yml | 110 ++++++++++++++++++++++++ .gitignore | 1 + doctum-config.php | 33 +++++++ 4 files changed, 163 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/build-doctum-docs.yml create mode 100644 doctum-config.php diff --git a/.gitattributes b/.gitattributes index 3890062d6..f2e2cb4a5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,24 +2,25 @@ # https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html # Ignore all test and documentation with "export-ignore". -/.github export-ignore -/.phpunit.cache export-ignore -/build export-ignore -/database/database.sqlite export-ignore -/database/sqlite.database. export-ignore -/docs export-ignore -/resources/views/tests export-ignore -/tests export-ignore -/vendor export-ignore -/.editorconfig export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore -/.php-cs-fixer.cache export-ignore -/.php-cs-fixer.php export-ignore -/phpunit.result.cache export-ignore -/phpstan.neon export-ignore -/phpunit.xml.dist export-ignore -/psalm.xml export-ignore +/.github export-ignore +/.phpunit.cache export-ignore +/build export-ignore +/database/database.sqlite export-ignore +/database/sqlite.database. export-ignore +/doctum export-ignore +/docs export-ignore +/resources/views/tests export-ignore +/tests export-ignore +/vendor export-ignore +/.editorconfig export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore +/.php-cs-fixer.cache export-ignore +/.php-cs-fixer.php export-ignore +/phpunit.result.cache export-ignore +/phpstan.neon export-ignore +/phpunit.xml.dist export-ignore +/psalm.xml export-ignore /psalm.xml.dist export-ignore /testbench.yaml export-ignore /codecov.yml export-ignore diff --git a/.github/workflows/build-doctum-docs.yml b/.github/workflows/build-doctum-docs.yml new file mode 100644 index 000000000..58b93f86f --- /dev/null +++ b/.github/workflows/build-doctum-docs.yml @@ -0,0 +1,110 @@ +name: build-doctum-docs + +on: [pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + name: Update-DoctumDocs-Branch + + steps: + - uses: actions/checkout@v3 + with: + # The branch, tag or SHA to checkout. When checking out the repository that + # triggered a workflow, this defaults to the reference or SHA for that event. + # Otherwise, uses the default branch. + ref: 'master' + + - name: build doctum docs + uses: sudo-bot/action-doctum@latest + with: + config-file: doctum-config.php + # parse, render or update + method: "update" + # (optional) defaults to '--output-format=github --no-ansi --no-progress -v' + cli-args: "--output-format=github --no-ansi --no-progress -v" + + - name: Remove GitHub Specific Issues + run: | + rm .editorconfig + rm .gitattributes + rm .gitignore + + - name: Remove Package Specific Items + run: | + rm composer.json + rm codecov.yml + rm coverage.xml + rm doctum-config.php + rm phpstan.neon + rm phpunit.xml.dist + rm psalm.xml.dist + rm CHANGELOG.md + rm CONTRIBUTORS.md + rm LICENSE.md + rm README.md + + - name: Remove Package Directories + run: | + rm -rf .github + rm -rf build/cache + rm -rf cache + rm -rf config + rm -rf docs + rm -rf database + rm -rf resources + rm -rf public + rm -rf src + rm -rf tests + + - name: Move Doctum Docs + run: | + mv build docs + git add docs/* + + - name: Restore Readme + run: | + echo "This branch is used solely to store Doctum Documents)" >> README.md + + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + # Optional. Commit message for the created commit. + # Defaults to "Apply automatic changes" + commit_message: Automated Change + + # Optional. Options used by `git-commit`. + # See https://git-scm.com/docs/git-commit#_options + commit_options: '--no-verify --signoff' + + # Optional. Option used by `git-status` to determine if the repository is + # dirty. See https://git-scm.com/docs/git-status#_options + status_options: '--untracked-files=yes' + + # Optional. Local and remote branch name where commit is going to be pushed + # to. Defaults to the current branch. + # You might need to set `create_branch: true` if the branch does not exist. + branch: doctum-docs + + # Optional. Options used by `git-add`. + # See https://git-scm.com/docs/git-add#_options + add_options: '-u' + + # Optional. Disable dirty check and always try to create a commit and push + skip_dirty_check: true + + # Optional. Skip internal call to `git fetch` + skip_fetch: true + + # Optional. Skip internal call to `git checkout` + skip_checkout: true + + # Optional. Options used by `git-push`. + # See https://git-scm.com/docs/git-push#_options + push_options: '--force' + + # Optional commit user and author settings + commit_user_name: Doctum Docs Bot # defaults to "github-actions[bot]" + commit_user_email: my-github-actions-bot@example.org # defaults to "41898282+github-actions[bot]@users.noreply.github.com" + commit_author: Doctum Docs Bot # defaults to author of the commit that triggered the run + create_branch: true diff --git a/.gitignore b/.gitignore index d5834f1b7..ad5cddcaa 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ phpunit.xml.dist.dev .env phpunit.xml.bak phpstan.txt +doctum \ No newline at end of file diff --git a/doctum-config.php b/doctum-config.php new file mode 100644 index 000000000..f2d75656f --- /dev/null +++ b/doctum-config.php @@ -0,0 +1,33 @@ +files() + ->name('*.php') + ->exclude('Resources') + ->exclude('Tests') + ->in($dir); + +// generate documentation for all v2.0.* tags, the 2.0 branch, and the main one +$versions = GitVersionCollection::create($dir) + // In a non case-sensitive way, tags containing "PR", "RC", "BETA" and "ALPHA" will be filtered out + // To change this, use: `$versions->setFilter(static function (string $version): bool { // ... });` + ->add('master', '3.x branch') + ->add('v2-master', '2.x branch') + ->add('v1', '1.x branch'); + +return new Doctum($iterator, [ + 'versions' => $versions, + 'title' => 'Rappasoft - Laravel Livewire Tables', + 'build_dir' => __DIR__.'/build/%version%', + 'cache_dir' => __DIR__.'/cache/%version%', + 'source_dir' => dirname($dir).'/', + 'remote_repository' => new GitHubRemoteRepository('rappasoft/laravel-livewire-tables', dirname($dir)), + 'default_opened_level' => 2, // optional, 2 is the default value +]); From 1c134a2cdd07baf111951fa816addc8defe66b25 Mon Sep 17 00:00:00 2001 From: lrljoe Date: Sun, 5 Nov 2023 22:51:34 +0000 Subject: [PATCH 2/6] Fix styling --- doctum-config.php | 66 +++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/doctum-config.php b/doctum-config.php index f2d75656f..461333e77 100644 --- a/doctum-config.php +++ b/doctum-config.php @@ -1,33 +1,33 @@ -files() - ->name('*.php') - ->exclude('Resources') - ->exclude('Tests') - ->in($dir); - -// generate documentation for all v2.0.* tags, the 2.0 branch, and the main one -$versions = GitVersionCollection::create($dir) - // In a non case-sensitive way, tags containing "PR", "RC", "BETA" and "ALPHA" will be filtered out - // To change this, use: `$versions->setFilter(static function (string $version): bool { // ... });` - ->add('master', '3.x branch') - ->add('v2-master', '2.x branch') - ->add('v1', '1.x branch'); - -return new Doctum($iterator, [ - 'versions' => $versions, - 'title' => 'Rappasoft - Laravel Livewire Tables', - 'build_dir' => __DIR__.'/build/%version%', - 'cache_dir' => __DIR__.'/cache/%version%', - 'source_dir' => dirname($dir).'/', - 'remote_repository' => new GitHubRemoteRepository('rappasoft/laravel-livewire-tables', dirname($dir)), - 'default_opened_level' => 2, // optional, 2 is the default value -]); +files() + ->name('*.php') + ->exclude('Resources') + ->exclude('Tests') + ->in($dir); + +// generate documentation for all v2.0.* tags, the 2.0 branch, and the main one +$versions = GitVersionCollection::create($dir) + // In a non case-sensitive way, tags containing "PR", "RC", "BETA" and "ALPHA" will be filtered out + // To change this, use: `$versions->setFilter(static function (string $version): bool { // ... });` + ->add('master', '3.x branch') + ->add('v2-master', '2.x branch') + ->add('v1', '1.x branch'); + +return new Doctum($iterator, [ + 'versions' => $versions, + 'title' => 'Rappasoft - Laravel Livewire Tables', + 'build_dir' => __DIR__.'/build/%version%', + 'cache_dir' => __DIR__.'/cache/%version%', + 'source_dir' => dirname($dir).'/', + 'remote_repository' => new GitHubRemoteRepository('rappasoft/laravel-livewire-tables', dirname($dir)), + 'default_opened_level' => 2, // optional, 2 is the default value +]); From 2adb401c10d6e5b36f5d8d33af76fe7deda25088 Mon Sep 17 00:00:00 2001 From: Joe <104938042+lrljoe@users.noreply.github.com> Date: Sun, 5 Nov 2023 22:57:52 +0000 Subject: [PATCH 3/6] Add Contributing --- CONTRIBUTING.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..f4e9fea06 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,9 @@ +# Contributing +Contributions are very welcome, please find below a summary of what is expected from contributions: + +- Follow the conventions for methods, adding to the relevant configuration/helper trait +- Add properties to the "With" trait +- Typehint both properties and return values +- Add a comment to the method +- Add tests for new methods +- Add documentation for new methods \ No newline at end of file From 52f7352d274f89cfbc59ea1569f7aaaabefb86b6 Mon Sep 17 00:00:00 2001 From: Joe <104938042+lrljoe@users.noreply.github.com> Date: Sun, 5 Nov 2023 23:00:06 +0000 Subject: [PATCH 4/6] Swap to Develop --- .github/workflows/build-doctum-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-doctum-docs.yml b/.github/workflows/build-doctum-docs.yml index 58b93f86f..a706c8d5a 100644 --- a/.github/workflows/build-doctum-docs.yml +++ b/.github/workflows/build-doctum-docs.yml @@ -14,7 +14,7 @@ jobs: # The branch, tag or SHA to checkout. When checking out the repository that # triggered a workflow, this defaults to the reference or SHA for that event. # Otherwise, uses the default branch. - ref: 'master' + ref: 'develop' - name: build doctum docs uses: sudo-bot/action-doctum@latest From ab2fc4a4a0d542be5f8d7c884c9b56228d04e3d7 Mon Sep 17 00:00:00 2001 From: Joe <104938042+lrljoe@users.noreply.github.com> Date: Sun, 5 Nov 2023 23:05:21 +0000 Subject: [PATCH 5/6] Adjust Doctum Branch phasing --- doctum-config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doctum-config.php b/doctum-config.php index 461333e77..2e13b5045 100644 --- a/doctum-config.php +++ b/doctum-config.php @@ -18,7 +18,7 @@ $versions = GitVersionCollection::create($dir) // In a non case-sensitive way, tags containing "PR", "RC", "BETA" and "ALPHA" will be filtered out // To change this, use: `$versions->setFilter(static function (string $version): bool { // ... });` - ->add('master', '3.x branch') + ->add('develop', '3.x branch') ->add('v2-master', '2.x branch') ->add('v1', '1.x branch'); From d57304974c50d6e5def815a008324e37ff56668b Mon Sep 17 00:00:00 2001 From: Joe <104938042+lrljoe@users.noreply.github.com> Date: Sun, 5 Nov 2023 23:18:36 +0000 Subject: [PATCH 6/6] Roll Back Doctum Functionality --- .gitattributes | 1 - .github/workflows/build-doctum-docs.yml | 110 ------------------------ .gitignore | 3 +- doctum-config.php | 33 ------- 4 files changed, 1 insertion(+), 146 deletions(-) delete mode 100644 .github/workflows/build-doctum-docs.yml delete mode 100644 doctum-config.php diff --git a/.gitattributes b/.gitattributes index f2e2cb4a5..b15bffdc8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -7,7 +7,6 @@ /build export-ignore /database/database.sqlite export-ignore /database/sqlite.database. export-ignore -/doctum export-ignore /docs export-ignore /resources/views/tests export-ignore /tests export-ignore diff --git a/.github/workflows/build-doctum-docs.yml b/.github/workflows/build-doctum-docs.yml deleted file mode 100644 index a706c8d5a..000000000 --- a/.github/workflows/build-doctum-docs.yml +++ /dev/null @@ -1,110 +0,0 @@ -name: build-doctum-docs - -on: [pull_request] - -jobs: - build: - runs-on: ubuntu-latest - - name: Update-DoctumDocs-Branch - - steps: - - uses: actions/checkout@v3 - with: - # The branch, tag or SHA to checkout. When checking out the repository that - # triggered a workflow, this defaults to the reference or SHA for that event. - # Otherwise, uses the default branch. - ref: 'develop' - - - name: build doctum docs - uses: sudo-bot/action-doctum@latest - with: - config-file: doctum-config.php - # parse, render or update - method: "update" - # (optional) defaults to '--output-format=github --no-ansi --no-progress -v' - cli-args: "--output-format=github --no-ansi --no-progress -v" - - - name: Remove GitHub Specific Issues - run: | - rm .editorconfig - rm .gitattributes - rm .gitignore - - - name: Remove Package Specific Items - run: | - rm composer.json - rm codecov.yml - rm coverage.xml - rm doctum-config.php - rm phpstan.neon - rm phpunit.xml.dist - rm psalm.xml.dist - rm CHANGELOG.md - rm CONTRIBUTORS.md - rm LICENSE.md - rm README.md - - - name: Remove Package Directories - run: | - rm -rf .github - rm -rf build/cache - rm -rf cache - rm -rf config - rm -rf docs - rm -rf database - rm -rf resources - rm -rf public - rm -rf src - rm -rf tests - - - name: Move Doctum Docs - run: | - mv build docs - git add docs/* - - - name: Restore Readme - run: | - echo "This branch is used solely to store Doctum Documents)" >> README.md - - - uses: stefanzweifel/git-auto-commit-action@v4 - with: - # Optional. Commit message for the created commit. - # Defaults to "Apply automatic changes" - commit_message: Automated Change - - # Optional. Options used by `git-commit`. - # See https://git-scm.com/docs/git-commit#_options - commit_options: '--no-verify --signoff' - - # Optional. Option used by `git-status` to determine if the repository is - # dirty. See https://git-scm.com/docs/git-status#_options - status_options: '--untracked-files=yes' - - # Optional. Local and remote branch name where commit is going to be pushed - # to. Defaults to the current branch. - # You might need to set `create_branch: true` if the branch does not exist. - branch: doctum-docs - - # Optional. Options used by `git-add`. - # See https://git-scm.com/docs/git-add#_options - add_options: '-u' - - # Optional. Disable dirty check and always try to create a commit and push - skip_dirty_check: true - - # Optional. Skip internal call to `git fetch` - skip_fetch: true - - # Optional. Skip internal call to `git checkout` - skip_checkout: true - - # Optional. Options used by `git-push`. - # See https://git-scm.com/docs/git-push#_options - push_options: '--force' - - # Optional commit user and author settings - commit_user_name: Doctum Docs Bot # defaults to "github-actions[bot]" - commit_user_email: my-github-actions-bot@example.org # defaults to "41898282+github-actions[bot]@users.noreply.github.com" - commit_author: Doctum Docs Bot # defaults to author of the commit that triggered the run - create_branch: true diff --git a/.gitignore b/.gitignore index ad5cddcaa..a36981422 100644 --- a/.gitignore +++ b/.gitignore @@ -18,5 +18,4 @@ phpunit.xml.dist.dev .history/* .env phpunit.xml.bak -phpstan.txt -doctum \ No newline at end of file +phpstan.txt \ No newline at end of file diff --git a/doctum-config.php b/doctum-config.php deleted file mode 100644 index 2e13b5045..000000000 --- a/doctum-config.php +++ /dev/null @@ -1,33 +0,0 @@ -files() - ->name('*.php') - ->exclude('Resources') - ->exclude('Tests') - ->in($dir); - -// generate documentation for all v2.0.* tags, the 2.0 branch, and the main one -$versions = GitVersionCollection::create($dir) - // In a non case-sensitive way, tags containing "PR", "RC", "BETA" and "ALPHA" will be filtered out - // To change this, use: `$versions->setFilter(static function (string $version): bool { // ... });` - ->add('develop', '3.x branch') - ->add('v2-master', '2.x branch') - ->add('v1', '1.x branch'); - -return new Doctum($iterator, [ - 'versions' => $versions, - 'title' => 'Rappasoft - Laravel Livewire Tables', - 'build_dir' => __DIR__.'/build/%version%', - 'cache_dir' => __DIR__.'/cache/%version%', - 'source_dir' => dirname($dir).'/', - 'remote_repository' => new GitHubRemoteRepository('rappasoft/laravel-livewire-tables', dirname($dir)), - 'default_opened_level' => 2, // optional, 2 is the default value -]);