From df905d1ae88002f2ce25d9d1b04bdd440d781cca Mon Sep 17 00:00:00 2001 From: amutechtest Date: Mon, 1 Apr 2024 09:06:10 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=94=84=20Synchronize=20with=20@Andrew?= =?UTF-8?q?s-McMeel-Universal/action=5Ftemplate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/dependabot.yml | 5 -- .github/release-drafter.yml | 27 +++++--- .github/workflows/cleanup.yml | 1 + .github/workflows/linters.yml | 15 ++++- .gitignore | 113 +++++++++++++++++++++++++++++----- .prettierignore | 19 +++--- 6 files changed, 140 insertions(+), 40 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index fe45b5f..386c167 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -51,11 +51,6 @@ updates: groups: # Specify a name for the group, which will be used in pull request titles # and branch names - dependencies-major: - # Open a PR with all major version updates from "dependencies" in package.json - dependency-type: "production" - update-types: - - "major" dependencies-minor: # Open a PR with all minor version updates from "dependencies" in package.json dependency-type: "production" diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 63dc9bb..0168608 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -1,17 +1,20 @@ name-template: '$RESOLVED_VERSION' tag-template: '$RESOLVED_VERSION' categories: + - title: 🚀 Features + labels: + - 'feature' + - 'epic' + - 'story' - title: 🐛 Fixes labels: - 'bug' - - title: 📝 Documentation - labels: - - 'documentation' - title: 🔨 Maintenance labels: - 'tools' - 'tests' - 'dependencies' + - 'documentation' - title: 🔐 DevOps labels: - 'sync' @@ -40,18 +43,19 @@ autolabeler: - ".{npm,nvm}rc" - label: 'front-end' files: - - "**/*.{js,js.html,jsx,ts,tsx,html,css,less,scss,sass,otf,eot,ttf,woff*}" + - "**/*.{js,js.html,jsx,ts,tsx,html,css,less,scss,sass,otf,eot,ttf,woff*,erb}" - "public/" - "src/" - "wp-content/" - - ".storybook/" - "package.json" - "!/.vscode" - "!/.devcontainer" - "!**/*.test.js" - label: 'back-end' files: - - "**/*.{cs,sln,csproj,rb,ru}" + - "**/*.{cs,sln,csproj,ru}" + - "appsettings.*json" + - "CodeCoverage.runsettings" - label: 'tools' files: - "/.vscode" @@ -60,13 +64,13 @@ autolabeler: - ".{prettierrc,size-limit,eslintrc}.js" - ".{yamllint,yarnrc,mega-linter,solargraph,postcssrc,erb-lint,rubocop}.yml" - ".{jscpd,markdownlint,babel.config,prettierrc,eslintrc,stylelintrc}.json" - - label: 'tests' - files: - "playwright/**" - "cypress/**" - ".spec.*" - "*.test.js" - "{jest,playwright}.*.js" + - ".storybook/" + - ".browserlistrc" - label: 'devops' files: - ".github/" @@ -80,12 +84,19 @@ version-resolver: major: labels: - 'major' + - 'epic' + - 'feature' minor: labels: - 'minor' + - 'story' + - 'maintenance' + - 'research' patch: labels: - 'patch' + - 'bug' + - 'sync' default: patch template: | ## What's Changed diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml index 9a8e4f5..d3cdf12 100644 --- a/.github/workflows/cleanup.yml +++ b/.github/workflows/cleanup.yml @@ -5,6 +5,7 @@ on: types: [closed] schedule: - cron: 0 0 * * 0 + workflow_dispatch: jobs: cleanup: diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index e1c36f6..3d0fe7d 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -15,8 +15,8 @@ jobs: name: Jira PR Linter uses: Andrews-McMeel-Universal/reusable_workflows/.github/workflows/jira-lint.yaml@2 with: - fail-on-error: false - skip-comments: true + fail-on-error: ${{ vars.JIRA_LINT_FAIL_ON_ERROR || 'false' }} + skip-comments: ${{ vars.JIRA_LINT_SKIP_COMMENTS || 'true' }} secrets: JIRA_TOKEN: ${{ secrets.JIRA_TOKEN }} @@ -29,3 +29,14 @@ jobs: prettierPlugins: ${{ vars.INSTALL_PRETTIER_PLUGINS }} secrets: PAT_ACTION_CI: ${{ secrets.PAT_ACTION_CI }} + + do-not-merge: + name: Disable merging on label + if: ${{ contains(github.event.pull_request.labels.*.name, 'do not merge') }} + runs-on: ubuntu-latest + steps: + - name: Check for label + run: | + echo "Pull request is labeled as 'do not merge'" + echo "This workflow fails so that the pull request cannot be merged" + exit 1 \ No newline at end of file diff --git a/.gitignore b/.gitignore index 31425dd..2ce1af4 100644 --- a/.gitignore +++ b/.gitignore @@ -152,6 +152,7 @@ wp-content/shield/ /wp-content/plugins/wpengine-snapshot/snapshots /wp-content/mysql.sql /.wpe-devkit +/site-archive-*-live-*-*/ # Large and binary files # NOTE: @@ -333,19 +334,90 @@ atlassian-ide-plugin.xml mono_crash.* # Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ +*Service*/[Dd]ebug/ +*Service*/[Dd]ebugPublic/ +*Service*/[Rr]elease/ +*Service*/[Rr]eleases/ +*Service*/x64/ +*Service*/x86/ +*Service*/[Ww][Ii][Nn]32/ +*Service*/[Aa][Rr][Mm]/ +*Service*/[Aa][Rr][Mm]64/ +*Service*/bld/ +*Service*/[Oo]bj/ +*Service*/[Ll]og/ +*Service*/[Ll]ogs/ +*Service*/bin/ +SharedLibraries/*/[Dd]ebug/ +SharedLibraries/*/[Dd]ebugPublic/ +SharedLibraries/*/[Rr]elease/ +SharedLibraries/*/[Rr]eleases/ +SharedLibraries/*/x64/ +SharedLibraries/*/x86/ +SharedLibraries/*/[Ww][Ii][Nn]32/ +SharedLibraries/*/[Aa][Rr][Mm]/ +SharedLibraries/*/[Aa][Rr][Mm]64/ +SharedLibraries/*/bld/ +SharedLibraries/*/[Oo]bj/ +SharedLibraries/*/[Ll]og/ +SharedLibraries/*/[Ll]ogs/ +SharedLibraries/*/bin/ +*Function*/[Dd]ebug/ +*Function*/[Dd]ebugPublic/ +*Function*/[Rr]elease/ +*Function*/[Rr]eleases/ +*Function*/x64/ +*Function*/x86/ +*Function*/[Ww][Ii][Nn]32/ +*Function*/[Aa][Rr][Mm]/ +*Function*/[Aa][Rr][Mm]64/ +*Function*/bld/ +*Function*/[Oo]bj/ +*Function*/[Ll]og/ +*Function*/[Ll]ogs/ +*Function*/bin/ +*.Models/[Dd]ebug/ +*.Models/[Dd]ebugPublic/ +*.Models/[Rr]elease/ +*.Models/[Rr]eleases/ +*.Models/x64/ +*.Models/x86/ +*.Models/[Ww][Ii][Nn]32/ +*.Models/[Aa][Rr][Mm]/ +*.Models/[Aa][Rr][Mm]64/ +*.Models/bld/ +*.Models/[Oo]bj/ +*.Models/[Ll]og/ +*.Models/[Ll]ogs/ +*.Models/bin/ +*.Library/[Dd]ebug/ +*.Library/[Dd]ebugPublic/ +*.Library/[Rr]elease/ +*.Library/[Rr]eleases/ +*.Library/x64/ +*.Library/x86/ +*.Library/[Ww][Ii][Nn]32/ +*.Library/[Aa][Rr][Mm]/ +*.Library/[Aa][Rr][Mm]64/ +*.Library/bld/ +*.Library/[Oo]bj/ +*.Library/[Ll]og/ +*.Library/[Ll]ogs/ +*.Library/bin/ +*.Tests/[Dd]ebug/ +*.Tests/[Dd]ebugPublic/ +*.Tests/[Rr]elease/ +*.Tests/[Rr]eleases/ +*.Tests/x64/ +*.Tests/x86/ +*.Tests/[Ww][Ii][Nn]32/ +*.Tests/[Aa][Rr][Mm]/ +*.Tests/[Aa][Rr][Mm]64/ +*.Tests/bld/ +*.Tests/[Oo]bj/ +*.Tests/[Ll]og/ +*.Tests/[Ll]ogs/ +*.Tests/bin/ # Visual Studio 2015/2017 cache/options directory .vs/ @@ -726,6 +798,10 @@ FodyWeavers.xsd /.pnp .pnp.js +# generated during build +robots.txt +sitemap*.xml + # misc .DS_Store @@ -753,8 +829,10 @@ Secrets.json .setup_done # Azure B2C -/**/src/custom-policies/B2C_1A_*_*_SIGNINSIGNOUT_*.xml -/custom-policies/**/B2C_1A_*_*_SIGNINSIGNOUT_*.xml +**/B2C_1A_*SIGNINSIGNOUT*.xml +**/B2C_1A_*IMPERSONATION*.xml +dist/index.html +.parcel-cache/ # Azure Functions *.Functions/Properties/ServiceDependencies/*/*.json @@ -766,4 +844,7 @@ terraform/.terraform/ terraform/*.tfstate* terraform/*.tfplan terraform/variables.tf -terraform/*.key \ No newline at end of file +terraform/*.key + +# Ansible +vault.yml \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index ccaad03..ab31eb8 100644 --- a/.prettierignore +++ b/.prettierignore @@ -35,14 +35,15 @@ src/design-system-package/dist/** wp-content/ # Games -*Game/ +/*Game/ # Dotnet -*Service/ -*.Library/ -*.Tests/ -*.WebAPI/ -*.sln -*.csproj -*.lutconfig -.editorconfig \ No newline at end of file +/*Service/ +/*.Library/ +/*.Tests/ +/*.WebAPI/ +**/*.sln +**/*.csproj +**/*.cs +/*.lutconfig +/.editorconfig \ No newline at end of file From ad5636593a85f838acba172d0e91aae476e9425d Mon Sep 17 00:00:00 2001 From: ebronson68 <111298136+ebronson68@users.noreply.github.com> Date: Mon, 1 Apr 2024 16:25:41 -0500 Subject: [PATCH 2/2] Manual sync with template --- .github/CONTRIBUTING.md | 20 ++++++++++---------- README.md | 32 ++++++++++++++++++-------------- 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 39ab30d..7c00cae 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,21 +1,21 @@ # Contributing -New branches should always be associated with a Jira ticket. The branch should be prefixed with the issue key and a short description, like so: `jiraIssueType/AMUPRODUCT-1234/hyphenated-issue-summary`. +## Branch Naming Convention -## Jira Smart Commits +When creating a new branch, it should be associated with a Jira ticket. The branch name should follow this format: `jiraIssueType/AMUPRODUCT-1234/hyphenated-issue-summary`. -In scenarios where creating a separate branch for each Jira ticket is not exactly feasible, you can still trigger our automation by using what are called [smart commits](https://confluence.atlassian.com/fisheye/using-smart-commits-960155400.html). +## Using Jira Smart Commits -To use Jira smart commits, you would include the Jira issue key for each commit like so: `[AMUPRODUCT-1234], [AMUPRODUCT-1235] Knocked out the 4 copy edits needed` +In cases where creating a separate branch for each Jira ticket isn't practical, you can use [smart commits](https://confluence.atlassian.com/fisheye/using-smart-commits-960155400.html) to trigger our automation. Include the Jira issue key in each commit message like this: `[AMUPRODUCT-1234], [AMUPRODUCT-1235] Implemented the 4 required copy edits`. -## Creating Pull Requests +## Pull Request Process -Once you have committed your effort in a separate branch, you will need to raise a pull request in Github. While filling out the Pull Request, **Please** follow the pull request template format and write a brief description of any technical details and Jira tickets that are related to the PR. +After committing your changes in a separate branch, you'll need to create a pull request (PR) on Github. When creating the PR, adhere to the provided PR template format and include a concise description of the technical details and related Jira tickets. -The recommended title for the pull request is typically just the branch name. Again, if a single issue per branch is not feasible, including a brief title of the effort is acceptable. +The PR title should ideally be the branch name. If multiple issues are addressed in a single branch, a brief, descriptive title is acceptable. -You do not need to fill in the reviewers or assignees. Our CODEOWNERS automation takes care of who will need to review it. As long as a AMU software engineer reviews it and the other checks pass, they will take care of merging the pull request into staging and production. +You don't need to specify reviewers or assignees. Our CODEOWNERS automation determines who will review your PR. Once an AMU software engineer reviews and approves your PR, and all checks pass, they will merge your PR into the staging and production branches. -> NOTE: On every PR, we do run tests and automatically format the code with Prettier. +> **NOTE:** Every PR triggers tests and automatic code formatting with Prettier. -> NOTE: A PR will not be able to be merged until at least 1 reviewer with write access has approved it and all tests are passing. If a PR is updated with a new commit, stale reviews will be dismissed. +> **NOTE:** A PR can't be merged until at least one reviewer with write access approves it and all tests pass. If a PR is updated with a new commit, previous reviews will be dismissed. \ No newline at end of file diff --git a/README.md b/README.md index 7796487..9115de4 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,24 @@ # Action Template -Yarn Install composite action for yarn 3/4+ and "nodeLinker: node-modules" +This is a Yarn Install composite action designed for Yarn versions 3/4+ and "nodeLinker: node-modules". It helps to cache and speed up your Yarn installations in your GitHub workflows. -Reference: https://gist.github.com/belgattitude/042f9caf10d029badbde6cf9d43e400a +Reference: [Gist](https://gist.github.com/belgattitude/042f9caf10d029badbde6cf9d43e400a) ## Getting Started +To get started, clone the repository: + ```bash git clone https://github.com/Andrews-McMeel-Universal/cache-yarn-install ``` ## Installation -To make `cache-yarn-install` a part of your workflow, just add a step to one of your workflows in your `.github/workflows/` directory in your GitHub repository. +To integrate `cache-yarn-install` into your workflow, add a step to one of your workflows in the `.github/workflows/` directory of your GitHub repository. -> Requirement: @setup/node should be run before +> **Note:** The `@setup/node` action should be run before this action. -Example: +Here's an example of how to use it: ```YAML - name: Cache Yarn Install @@ -24,18 +26,20 @@ Example: with: enable-corepack: false cwd: ${{ github.workspace }}/apps/my-app - cache-prefix: add cache key prefix + cache-prefix: 'your-cache-key-prefix' cache-node-modules: false cache-install-state: false ``` ## Options -| Variable | Description | Required | `[Default]` | -| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | :------: | ----------- | -| `cwd` | Changes node's process.cwd() if the project is not located on the root. Default to process.cwd() | | `.` | -| `cache-prefix` | Add a specific cache-prefix | | `'default'` | -| `cache-npm-cache` | Cache npm global cache folder often used by node-gyp, prebuild binaries (invalidated on lock/os/node-version) | | `'true'` | -| `cache-node-modules` | Cache node_modules, might speed up link step (invalidated lock/os/node-version/branch) | | `'false'` | -| `cache-install-state` | Cache yarn install state, might speed up resolution step when node-modules cache is activated (invalidated lock/os/node-version/branch) | | `'false'` | -| `enable-corepack` | Enable corepack | | `'true'` | +Here are the options you can configure for this action: + +| Variable | Description | Required | Default | +| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | :------: | ------- | +| `cwd` | Changes node's process.cwd() if the project is not located at the root. Defaults to process.cwd() | No | `.` | +| `cache-prefix` | Adds a specific cache-prefix. | No | `'default'` | +| `cache-npm-cache` | Caches npm global cache folder often used by node-gyp, prebuild binaries. Invalidated on lock/os/node-version changes. | No | `'true'` | +| `cache-node-modules` | Caches node_modules to potentially speed up the link step. Invalidated on lock/os/node-version/branch changes. | No | `'false'` | +| `cache-install-state` | Caches yarn install state to potentially speed up the resolution step when node-modules cache is activated. Invalidated on lock/os/node-version/branch changes. | No | `'false'` | +| `enable-corepack` | Enables corepack. | No | `'true'` |