Code Monkey home page Code Monkey logo

scaffold's Introduction

Scaffold logo

Generic project scaffold template

GitHub Issues GitHub Pull Requests Test codecov LICENSE Release (latest by date) Renovate

Features

How to use this scaffold repository

  1. Click on Use this template > Create a new repository
  2. Checkout locally
  3. Run ./init.sh to replace yournamespace, yourproject, Your Name strings with your own and choose the features.
    init

scaffold's People

Contributors

alexskrypnyk avatar renovate[bot] avatar tannguyen04 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

scaffold's Issues

Exploratory testing to find issues around `init.sh` script

When running init.sh script with different options selected, there are different types of string replacements take place.

This issue is to conduct a limited 2 hrs testing to document all possible issues with replacements as new issues.

It may appear that we need to ask user for more inputs in init.sh script - document this as well.

SDs

Run ./init.sh with different variants and check what string have and have not been replaced. For example, currently the namespace in the PHP tests is not replaced.

Add Rector support

$rectorConfig->sets([
  SetList::PHP_80,
  SetList::PHP_81,
  SetList::CODE_QUALITY,
  SetList::CODING_STYLE,
  SetList::DEAD_CODE,
  SetList::INSTANCEOF,
  SetList::TYPE_DECLARATION,
]);

Add linter for GitHub actions

Add a linter for github actions yaml files to enforce the format:

  1. Yaml format - check for overall syntax
  2. Actions format - check for semantic syntax
  3. Style format - enforce a specific format around the structure (but make it configurable):
  • name must be present

This functionality should be shipped with the scaffolded projects to enforce checks for their GHA configs.

Not possible to see the coverage

Current GH action is good, but it does not provide a quick way to look at the current coverage (the badge is not link to an HTML report).

We need to either update the badge to point to the HTML asset from the build or switch to Codecov

PHAR cannot be published due to an upstream issue

reactphp/promise#252

composer/composer#11620

2023-09-09T06:24:03.9342445Z   - Installing humbug/box (4.3.8): Extracting archive
2023-09-09T06:24:04.0777833Z     Install of symfony/var-dumper failed
2023-09-09T06:24:04.1830005Z     Install of seld/jsonlint failed
2023-09-09T06:24:04.3146223Z     Install of justinrainbow/json-schema failed
2023-09-09T06:24:04.3229868Z     Install of humbug/php-scoper failed
2023-09-09T06:24:04.3329068Z     Skipped installation of bin bin/php-parse for package nikic/php-parser: name conflicts with an existing file
2023-09-09T06:24:04.5199032Z     Install of humbug/box failed
2023-09-09T06:24:04.5224281Z Unhandled promise rejection with ArgumentCountError: Too few arguments to function React\Promise\Promise::React\Promise\{closure}(), 0 passed in phar:///usr/bin/composer/src/Composer/Installer/InstallationManager.php on line 660 and exactly 1 expected in phar:///usr/bin/composer/vendor/react/promise/src/Promise.php:277
2023-09-09T06:24:04.5227758Z Stack trace:
2023-09-09T06:24:04.5228456Z #0 phar:///usr/bin/composer/src/Composer/Installer/InstallationManager.php(660): React\Promise\Promise::React\Promise\{closure}()
2023-09-09T06:24:04.5229368Z #1 phar:///usr/bin/composer/vendor/react/promise/src/Internal/FulfilledPromise.php(47): Composer\Installer\InstallationManager::Composer\Installer\{closure}()
2023-09-09T06:24:04.5233862Z #2 phar:///usr/bin/composer/src/Composer/Installer/InstallationManager.php(661): React\Promise\Internal\FulfilledPromise->then()
2023-09-09T06:24:04.5252804Z #3 phar:///usr/bin/composer/vendor/react/promise/src/Promise.php(288): Composer\Installer\InstallationManager::Composer\Installer\{closure}()
2023-09-09T06:24:04.5253920Z #4 phar:///usr/bin/composer/vendor/react/promise/src/Promise.php(37): React\Promise\Promise->call()
2023-09-09T06:24:04.5254734Z #5 phar:///usr/bin/composer/src/Composer/Installer/InstallationManager.php(663): React\Promise\Promise->__construct()
2023-09-09T06:24:04.5255617Z #6 phar:///usr/bin/composer/src/Composer/Installer/InstallationManager.php(221): Composer\Installer\InstallationManager->runCleanup()
2023-09-09T06:24:04.5256466Z #7 phar:///usr/bin/composer/src/Composer/Installer.php(791): Composer\Installer\InstallationManager->execute()
2023-09-09T06:24:04.5257175Z #8 phar:///usr/bin/composer/src/Composer/Installer.php(616): Composer\Installer->doInstall()
2023-09-09T06:24:04.5257866Z #9 phar:///usr/bin/composer/src/Composer/Installer.php(290): Composer\Installer->doUpdate()
2023-09-09T06:24:04.5258585Z #10 phar:///usr/bin/composer/src/Composer/Command/RequireCommand.php(490): Composer\Installer->run()
2023-09-09T06:24:04.5259366Z #11 phar:///usr/bin/composer/src/Composer/Command/RequireCommand.php(339): Composer\Command\RequireCommand->doUpdate()
2023-09-09T06:24:04.5260178Z #12 

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

composer
composer.json
  • php >=8.2
  • symfony/console ^6.3 || ^7
  • bamarni/composer-bin-plugin ^1.8
  • dealerdirect/phpcodesniffer-composer-installer ^1
  • drupal/coder ^8.3
  • ergebnis/composer-normalize ^2.42
  • mikey179/vfsstream ^1.6
  • opis/closure ^3.6
  • phpmd/phpmd ^2.13
  • phpstan/phpstan ^1.10
  • phpunit/phpunit ^11
  • rector/rector ^1.0.0
github-actions
.github/workflows/assign-author.yml
  • toshimaru/auto-author-assign v2.1.0
.github/workflows/draft-release-notes.yml
  • release-drafter/release-drafter v6
.github/workflows/release-docs.yml
  • actions/checkout v4
  • actions/setup-node v4
  • actions/configure-pages v5
  • actions/upload-pages-artifact v3
  • actions/deploy-pages v4
.github/workflows/release-nodejs.yml
  • actions/checkout v4
  • actions/setup-node v4
.github/workflows/release-php.yml
  • actions/checkout v4
  • actions/cache v4
  • shivammathur/setup-php v2
  • softprops/action-gh-release v2
.github/workflows/test-actions.yml
  • actions/checkout v4
.github/workflows/test-docs.yml
  • actions/checkout v4
  • actions/setup-node v4
  • nwtgck/actions-netlify v3.0
.github/workflows/test-nodejs.yml
  • actions/checkout v4
  • actions/setup-node v4
  • lhotari/action-upterm v1
.github/workflows/test-php.yml
  • actions/checkout v4
  • actions/cache v4
  • shivammathur/setup-php v2
  • actions/upload-artifact v4
  • codecov/codecov-action v4
  • lhotari/action-upterm v1
  • actions/checkout v4
  • actions/cache v4
  • shivammathur/setup-php v2
  • lhotari/action-upterm v1
.github/workflows/test-scaffold.yml
  • actions/checkout v4
  • shivammathur/setup-php v2
  • luizm/action-sh-checker v0.8.0
  • actions/setup-node v4
  • actions/upload-artifact v4
  • codecov/codecov-action v4
  • lhotari/action-upterm v1
.github/workflows/test-shell.yml
  • actions/checkout v4
  • actions/setup-node v4
  • luizm/action-sh-checker v0.8.0
  • actions/upload-artifact v4
  • codecov/codecov-action v4
  • lhotari/action-upterm v1
npm
docs/package.json
  • @docusaurus/core 3.3.2
  • @docusaurus/plugin-google-gtag ^3.1.1
  • @docusaurus/preset-classic 3.3.2
  • @docusaurus/theme-mermaid ^3.1.1
  • @easyops-cn/docusaurus-search-local ^0.41.0
  • @mdx-js/react ^3.0.0
  • clsx ^2.0.0
  • prism-react-renderer ^2.3.0
  • raw-loader ^4.0.2
  • react ^18.0.0
  • react-dom ^18.0.0
  • @docusaurus/module-type-aliases 3.3.2
  • @docusaurus/types 3.3.2
  • cspell ^8.6.1
  • node >=18.0
package.json
  • npm >=8.0.0
  • node >=20.0.0

  • Check this box to trigger a request for Renovate to run again on this repository

Add a script to setup consistent repo settings

When managing multiple repositories, there is a significant effort required to setup configuration of the Github repos. While org-wide repo settings exist, personal repos do not have those settings available.

Need to find a solution that will be using some sort of config file to control the repo settings.

Similar to https://github.com/drevops/drevops/blob/develop/scripts/drevops/github-labels.sh, we need to have a quick way to configure a GitHub repo using a script.

The script should handle:

  • General settings
  • Labels
  • Protected branches

Replace logo generator with online service

<img width=200px height=200px src="https://placehold.jp/000000/ffffff/200x200.png?text=Project&css=%7B%22border-radius%22%3A%22%20100px%22%7D" alt="Project logo"></a>

that will look like

Project logo

Split actions into standalone files.

Use [verb]-[noun].yml format.

For example, release-notes.yml or publish-docs.yml

Also, update the names of the jobs and names of the actions.

The trigger conditions should not be a part of the name.

Docs spelling does not exclude code

Docs spelling does not exclude code

Also, the mdx is not recognised as markdown.

add to cspel.json:

"overrides": [
        {
            "filename": "**/*.mdx",
            "languageId": [
                "mdx",
                "markdown"
            ]
        }
    ],
    "languageSettings": [
        {
            "languageId": "markdown",
            "ignoreRegExpList": [
                "/^\\s*```(.|\\n)+?^\\s*```/gm"
            ]
        }
    ]

Replace logo placeholder generator with a static file link

The logo placeholder generator sometimes has outages, which leads to rendering the logo image as a broken link, making the repo look bad.

Suggestion here is to generate the logo file, attach it to the onboarding ticket and replace it in the README.md file.

So would need to add one more step to the onboarding instructions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.