Skip to content

Commit 10a1764

Browse files
committed
[CLP-7214] Changes
1 parent 8d53441 commit 10a1764

File tree

5 files changed

+87
-128
lines changed

5 files changed

+87
-128
lines changed

.github/workflows/lint.yml

Lines changed: 57 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,66 @@
1-
name: TS Lint Check
1+
name: Linter
22

3-
on: push
3+
on: pull_request
4+
5+
permissions:
6+
checks: write
7+
contents: write
8+
packages: read
9+
pull-requests: read
10+
statuses: write
411

512
jobs:
6-
lint:
7-
name: Lint Check
13+
check_release_label:
14+
name: Check release label
815
runs-on: ubuntu-latest
16+
if: ${{ github.actor != 'dependabot[bot]' }}
917
steps:
10-
- uses: actions/checkout@master
18+
- name: Get changed files
19+
uses: dorny/paths-filter@v3
20+
id: get-changes
21+
with:
22+
filters: |
23+
actions:
24+
- '!**/__*.yaml'
25+
26+
# Only enforce release label if action files changed
27+
- name: Enforce release label
28+
uses: docker://agilepathway/pull-request-label-checker:v1.0.104
29+
if: ${{ steps.get-changes.outputs.actions == 'true' }}
30+
with:
31+
one_of: new patch release,new minor release,new major release
32+
repo_token: ${{ secrets.GITHUB_TOKEN }}
33+
34+
actionlint:
35+
runs-on: ubuntu-latest
1136

12-
- name: Setup Node
13-
uses: actions/setup-node@v1
37+
steps:
38+
- uses: actions/checkout@v4
39+
- uses: reviewdog/action-actionlint@v1
1440
with:
15-
node-version: '10.x'
41+
fail_on_error: true
42+
reporter: github-pr-review
1643

17-
- name: Setup TS
18-
run: npm install tslint typescript -g
44+
super-linter:
45+
runs-on: ubuntu-latest
1946

20-
- name: Lint check with tslint
21-
run: tslint './src/*.ts'
47+
steps:
48+
- uses: actions/checkout@v4
49+
with:
50+
# super-linter needs the full git history to get the
51+
# list of files that changed across commits
52+
fetch-depth: 0
53+
- uses: super-linter/super-linter/slim@v7
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
VALIDATE_ALL_CODEBASE: false
57+
VALIDATE_NATURAL_LANGUAGE: false
58+
VALIDATE_TYPESCRIPT_STANDARD: false
59+
VALIDATE_ANSIBLE: false
60+
FILTER_REGEX_EXCLUDE: (.*/actions/link-checker-for-mms-gh-repos/dist/.*.js|.*/actions/add-codeowners-as-writer/dist/.*.js|.*/actions/terraform-auto-fmt/test/terraform.tf)
61+
KUBERNETES_KUBECONFORM_OPTIONS: "-verbose -schema-location https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-v1.json"
62+
VALIDATE_GO: false
63+
VALIDATE_GO_MODULES: false
64+
VALIDATE_JSCPD: false
65+
VALIDATE_JAVASCRIPT_STANDARD: false
66+
VALIDATE_JAVASCRIPT_PRETTIER: false

.github/workflows/release.yml

Lines changed: 15 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,19 @@
1-
name: Prepare for release
1+
name: Create release
2+
3+
permissions:
4+
contents: write # required to create releases
5+
issues: read # required to fetch labels
6+
pull-requests: read # required to fetch labels
27

38
on:
4-
push:
5-
tags:
6-
- '*'
9+
pull_request:
10+
types:
11+
- closed
12+
branches:
13+
- master
14+
workflow_dispatch:
715

816
jobs:
9-
release:
10-
name: Build production
11-
runs-on: ubuntu-latest
12-
steps:
13-
- uses: actions/checkout@v1
14-
15-
- uses: actions/setup-node@v1
16-
with:
17-
node-version: '10.x'
18-
19-
- name: Create Release
20-
uses: actions/[email protected]
21-
env:
22-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23-
with:
24-
tag_name: ${{ github.ref }}
25-
release_name: ${{ github.ref }}
26-
draft: 'false'
27-
prerelease: 'false'
28-
29-
- name: Rocket.Chat Notification
30-
uses: RocketChat/Rocket.Chat.GitHub.Action.Notification@master
31-
if: always()
32-
with:
33-
type: ${{ job.status }}
34-
job_name: ':rocket: *Publish new release ${{ github.ref }}*'
35-
channel: '#develop'
36-
url: ${{ secrets.ROCKETCHAT_WEBHOOK }}
17+
create-release:
18+
if: github.event.pull_request.merged
19+
uses: MediaMarktSaturn/cp-github-actions/.github/workflows/[email protected]

.github/workflows/test.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.

__tests__/main.test.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

package.json

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@
99
"pre-commit": "npm run format && npm run build",
1010
"test": "jest"
1111
},
12-
"husky": {
13-
"hooks": {
14-
"pre-commit": "npm run format && npm run build"
15-
}
16-
},
1712
"repository": {
1813
"type": "git",
1914
"url": "git+https://github.com/RocketChat/Rocket.Chat.GitHub.Action.Notification.git"
@@ -31,22 +26,22 @@
3126
},
3227
"homepage": "https://github.com/RocketChat/Rocket.Chat.GitHub.Action.Notification#readme",
3328
"dependencies": {
34-
"@actions/core": "^1.2.0",
35-
"@actions/exec": "^1.0.1",
36-
"@actions/github": "^1.1.0",
37-
"@actions/io": "^1.0.1",
38-
"@actions/tool-cache": "^1.1.2",
39-
"axios": "^0.19.0"
29+
"@actions/core": "^1.11.1",
30+
"@actions/exec": "^1.1.1",
31+
"@actions/github": "^6.0.0",
32+
"@actions/io": "^1.1.3",
33+
"@actions/tool-cache": "^2.0.1",
34+
"axios": "^1.7.7"
4035
},
4136
"devDependencies": {
42-
"@types/jest": "^24.0.23",
43-
"@types/node": "^12.12.12",
44-
"@zeit/ncc": "^0.20.5",
45-
"husky": "^3.1.0",
46-
"jest": "^24.9.0",
47-
"jest-circus": "^24.9.0",
48-
"prettier": "^1.19.1",
49-
"ts-jest": "^24.2.0",
50-
"typescript": "^3.7.2"
37+
"@types/jest": "^29.5.13",
38+
"@types/node": "^22.7.4",
39+
"@zeit/ncc": "^0.22.3",
40+
"husky": "^9.1.6",
41+
"jest": "^29.7.0",
42+
"jest-circus": "^29.7.0",
43+
"prettier": "^3.3.3",
44+
"ts-jest": "^29.2.5",
45+
"typescript": "^5.6.2"
5146
}
5247
}

0 commit comments

Comments
 (0)