Skip to content

Commit

Permalink
#29711 merge master done
Browse files Browse the repository at this point in the history
  • Loading branch information
jdotcms committed Sep 4, 2024
2 parents 8780b99 + b3427e9 commit 54f9d97
Show file tree
Hide file tree
Showing 143 changed files with 5,549 additions and 1,553 deletions.
16 changes: 15 additions & 1 deletion .github/actions/core-cicd/notification/notify-slack/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,16 @@ inputs:
slack-bot-token:
description: 'Slack Bot Token'
required: true
json:
description: 'Boolean flag to indicate if the payload is already a JSON object'
required: false
default: 'false'

runs:
using: "composite"
steps:
- name: Slack Notification
if: inputs.json == 'false'
uses: slackapi/slack-github-action@v1.26.0
with:
channel-id: ${{ inputs.channel-id }}
Expand All @@ -25,10 +30,19 @@ runs:
"type": "section",
"text": {
"type": "mrkdwn",
"text": "${{ inputs.payload }}"
"text": ${{ toJSON(inputs.payload) }}
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ inputs.slack-bot-token }}

- name: Slack Notification with JSON
if: inputs.json == 'true'
uses: slackapi/slack-github-action@v1.26.0
with:
channel-id: ${{ inputs.channel-id }}
payload: ${{ inputs.payload }}
env:
SLACK_BOT_TOKEN: ${{ inputs.slack-bot-token }}
15 changes: 12 additions & 3 deletions .github/workflows/cicd_comp_deployment-phase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,10 @@ jobs:
uses: ./.github/actions/core-cicd/notification/notify-slack
with:
channel-id: "log-docker"
payload: "> :large_purple_circle: *Attention dotters:* Docker image built!\n \n>This automated script is happy to announce that a new *docker* image has been built for *${{ inputs.environment }}* with *tags:* [`${{ steps.docker_build.outputs.tags }}`] :docker:"
payload: |
> :large_purple_circle: *Attention dotters:* Docker image built!
>
> This automated script is happy to announce that a new *docker* image has been built for *${{ inputs.environment }}* with *tags:* [`${{ steps.docker_build.outputs.tags }}`] :docker:
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}

# Send Slack notification for CLI publication (if required)
Expand All @@ -173,7 +176,10 @@ jobs:
uses: ./.github/actions/core-cicd/notification/notify-slack
with:
channel-id: "log-dotcli"
payload: "> :large_purple_circle: *Attention dotters:* dotCLI published!\n \n>This automated script is happy to announce that a new *_dotCLI_* version *tagged as:* [ `${{ steps.cli_publish.outputs.npm-package-version }}, ${{ steps.cli_publish.outputs.npm-package-version-tag }}` ] is now available on the `NPM` registry :package:!\n \n>`npm i -g @dotcms/dotcli@${{ steps.cli_publish.outputs.npm-package-version-tag }}`"
payload: |
> :large_purple_circle: *Attention dotters:* dotCLI published!
>
> This automated script is happy to announce that a new *_dotCLI_* version *tagged as:* [ `${{ steps.cli_publish.outputs.npm-package-version }}, ${{ steps.cli_publish.outputs.npm-package-version-tag }}` ] is now available on the `NPM` registry :package:!\n \n>`npm i -g @dotcms/dotcli@${{ steps.cli_publish.outputs.npm-package-version-tag }}`
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}

# Send Slack notification for SDK publication (if required)
Expand All @@ -182,6 +188,9 @@ jobs:
uses: ./.github/actions/core-cicd/notification/notify-slack
with:
channel-id: "log-sdk-libs"
payload: "> :large_orange_circle: *Attention dotters:* SDK libs (Angular, Client, Experiments and React) published!\n \n>This automated script is happy to announce that a new *_SDK libs_* version *tagged as:* [ `${{ steps.sdks_publish.outputs.npm-package-version }}` ] is now available on the `NPM` registry :package:!"
payload: |
> :large_orange_circle: *Attention dotters:* SDK libs (Angular, Client, Experiments and React) published!
>
> This automated script is happy to announce that a new *_SDK libs_* version *tagged as:* [ `${{ steps.sdks_publish.outputs.npm-package-version }}` ] is now available on the `NPM` registry :package:!
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}

6 changes: 5 additions & 1 deletion .github/workflows/cicd_manual_publish-starter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,13 @@ jobs:
runs-on: ubuntu-20.04
environment: trunk
steps:
- uses: actions/checkout@v4
- name: Slack Notification
uses: ./.github/actions/core-cicd/notification/notify-slack
with:
channel-id: "log-sdk-libs"
payload: "> :large_green_circle: *Attention dotters:* a new Starter published!\n \n>This automated script is happy to announce that a new *_${{ env.STARTER_TYPE }}_* :package: `${{ needs.deploy-artifacts.outputs.filename }}` is now available on `ARTIFACTORY` :frog:!\n \n>:link:${{ needs.deploy-artifacts.outputs.url }}\n>*Changelog* \n>```${{ github.event.inputs.changelog }}```"
payload: |
> :large_green_circle: *Attention dotters:* a new Starter published!
>
> This automated script is happy to announce that a new *_${{ env.STARTER_TYPE }}_* :package: `${{ needs.deploy-artifacts.outputs.filename }}` is now available on `ARTIFACTORY` :frog:!\n \n>:link:${{ needs.deploy-artifacts.outputs.url }}\n>*Changelog* \n>```${{ github.event.inputs.changelog }}```
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/cicd_post-workflow-reporting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -270,4 +270,5 @@ jobs:
with:
channel-id: ${{ vars.SLACK_REPORT_CHANNEL }}
payload: ${{ steps.prepare-slack-message.outputs.payload }}
json: true
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
90 changes: 90 additions & 0 deletions .github/workflows/issue_comp_next-release-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# action.yml
name: 'QA not needed update'
on:
workflow_call:
secrets:
CI_MACHINE_TOKEN:
description: 'CI machine token'
required: true
workflow_dispatch:
inputs:
issue_number:
description: 'Issue number'
type: number
required: false
label:
description: 'Label'
type: string
required: false

jobs:
qa-not-needed-update:
runs-on: ubuntu-20.04
env:
QA_NOT_NEEDED_LABEL: 'QA : Not Needed'
steps:
- run: echo 'GitHub context'
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
- name: Validate inputs
uses: actions/github-script@v7
with:
result-encoding: string
script: |
const issue = context.payload.issue;
if (!issue && '${{ inputs.issue_number }}'.trim() === '') {
console.log('Issue number is not provided');
process.exit(0);
}
const label = context.payload.label;
if (!label && '${{ inputs.label }}' !== '${{ env.QA_NOT_NEEDED_LABEL }}') {
console.log('Label is not "${{ env.QA_NOT_NEEDED_LABEL }}", exiting');
process.exit(0);
}
- name: Add Next Release label
uses: actions/github-script@v7
with:
result-encoding: string
retries: 3
retry-exempt-status-codes: 400,401
github-token: ${{ secrets.CI_MACHINE_TOKEN }}
script: |
const issue = context.payload.issue || await github.rest.issues.get({
issue_number: ${{ inputs.issue_number }},
owner: '${{ github.repository_owner }}',
repo: 'core'
});
if (!issue) {
console.log('Issue [${{ inputs.issue_number }}] not found');
process.exit(0);
}
console.log(`Issue: ${JSON.stringify(issue, null, 2)}`);
const dropAndLearnText = 'Drop Everything & Learn';
if (issue.data.title.includes(dropAndLearnText)) {
console.log(`Issue does have "${dropAndLearnText}" text in title, exiting`);
process.exit(0);
}
const typeCicdLabel = 'Type : CI/CD';
const foundLabel = issue.data.labels.find(label => label.name === typeCicdLabel);
if (foundLabel) {
console.log(`Issue does have "${typeCicdLabel}" label , exiting`);
process.exit(0);
}
await github.rest.issues.addLabels({
issue_number: ${{ inputs.issue_number }},
owner: '${{ github.repository_owner }}',
repo: 'core',
labels: ['Next Release']
});
const updated = await github.rest.issues.get({
issue_number: ${{ inputs.issue_number }},
owner: '${{ github.repository_owner }}',
repo: 'core'
});
console.log(`Labels: ${JSON.stringify(updated.data.labels, null, 2)}`);
10 changes: 8 additions & 2 deletions .github/workflows/issue_on-change_post-issue-edited.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
name: Post Issue Edited
on:
issues:
types: [edited, labeled]
types: [ edited, labeled ]

jobs:
frontend-notify:
name: Issue Resolve Actions
if: success()
uses: ./.github/workflows/issue_comp_frontend-notify.yml
secrets:
CI_MACHINE_USER: ${{ secrets.CI_MACHINE_USER }}
CI_MACHINE_TOKEN: ${{ secrets.CI_MACHINE_TOKEN }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

next-release-label-update:
name: Next Release label update
if: github.event.action == 'labeled'
uses: ./.github/workflows/issue_comp_next-release-label.yml
secrets:
CI_MACHINE_TOKEN: ${{ secrets.CI_MACHINE_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,9 @@ export class DotContentTypesPortletComponent implements OnInit, OnDestroy {
actions.push({
menuItem: {
label: this.dotMessageService.get('contenttypes.content.copy'),
command: (item: DotCMSContentType) => this.showCloneContentTypeDialog(item)
command: (item: DotCMSContentType) => {
this.showCloneContentTypeDialog(item);
}
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
class="flex w-full h-full align-items-stretch align-content-center category-list__item-wrapper"
(click)="rowClicked.emit({ index, item })"
[class.cursor-pointer]="item.hasChildren">
<div class="flex w-full align-content-center align-items-center">
<div class="flex w-full gap-1 align-content-center align-items-center">
<label
data-testId="category-item-label"
class="flex flex-grow-1 category-list__item-label"
class="category-list__item-label"
[class.cursor-pointer]="item.hasChildren"
[for]="item.key">
{{ item.value }}
Expand Down Expand Up @@ -59,6 +59,6 @@
</div>
}
</div>
} @else if (!$isInitialState) {
} @else if (!$isInitialState()) {
<dot-empty-container [configuration]="$emptyState()" [hideContactUsLink]="true" />
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
.category-list__item-wrapper {
padding-left: $spacing-3;
padding-right: $spacing-1;
overflow: hidden;
}

.category-list__item-checkbox {
Expand Down
60 changes: 30 additions & 30 deletions core-web/libs/sdk/angular/package.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
{
"name": "@dotcms/angular",
"version": "0.0.1-alpha.33",
"peerDependencies": {
"@angular/common": "^17.1.0",
"@angular/core": "^17.1.0",
"@angular/router": "^17.1.0",
"@dotcms/client": "0.0.1-alpha.33",
"@tinymce/tinymce-angular": "^8.0.0",
"rxjs": "^7.8.0"
},
"description": "Official Angular Components library to render a dotCMS page.",
"repository": {
"type": "git",
"url": "git+https://github.com/dotCMS/core.git#master"
},
"keywords": [
"dotCMS",
"CMS",
"Content Management",
"API Client",
"REST API",
"Angular",
"Components"
],
"author": "dotcms <dev@dotcms.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/dotCMS/core/issues"
},
"homepage": "https://github.com/dotCMS/core/tree/master/core-web/libs/sdk/angular/README.md"
"name": "@dotcms/angular",
"version": "0.0.1-alpha.34",
"peerDependencies": {
"@angular/common": "^17.1.0",
"@angular/core": "^17.1.0",
"@angular/router": "^17.1.0",
"@dotcms/client": "0.0.1-alpha.34",
"@tinymce/tinymce-angular": "^8.0.0",
"rxjs": "^7.8.0"
},
"description": "Official Angular Components library to render a dotCMS page.",
"repository": {
"type": "git",
"url": "git+https://github.com/dotCMS/core.git#master"
},
"keywords": [
"dotCMS",
"CMS",
"Content Management",
"API Client",
"REST API",
"Angular",
"Components"
],
"author": "dotcms <dev@dotcms.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/dotCMS/core/issues"
},
"homepage": "https://github.com/dotCMS/core/tree/master/core-web/libs/sdk/angular/README.md"
}
46 changes: 23 additions & 23 deletions core-web/libs/sdk/client/package.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
{
"name": "@dotcms/client",
"version": "0.0.1-alpha.33",
"description": "Official JavaScript library for interacting with DotCMS REST APIs.",
"repository": {
"type": "git",
"url": "git+https://github.com/dotCMS/core.git#master"
},
"scripts": {
"build": "nx run sdk-client:build:js; cd ../../../../dotCMS/src/main/webapp/html/js/editor-js; rm -rf src package.json *.esm.d.ts"
},
"keywords": [
"dotCMS",
"CMS",
"Content Management",
"API Client",
"REST API"
],
"author": "dotcms <dev@dotcms.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/dotCMS/core/issues"
},
"homepage": "https://github.com/dotCMS/core/tree/master/core-web/libs/sdk/client/README.md"
"name": "@dotcms/client",
"version": "0.0.1-alpha.34",
"description": "Official JavaScript library for interacting with DotCMS REST APIs.",
"repository": {
"type": "git",
"url": "git+https://github.com/dotCMS/core.git#master"
},
"scripts": {
"build": "nx run sdk-client:build:js; cd ../../../../dotCMS/src/main/webapp/html/js/editor-js; rm -rf src package.json *.esm.d.ts"
},
"keywords": [
"dotCMS",
"CMS",
"Content Management",
"API Client",
"REST API"
],
"author": "dotcms <dev@dotcms.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/dotCMS/core/issues"
},
"homepage": "https://github.com/dotCMS/core/tree/master/core-web/libs/sdk/client/README.md"
}
Loading

0 comments on commit 54f9d97

Please sign in to comment.