From d6539db727e8450caf2a9faacdec270d9241dfa2 Mon Sep 17 00:00:00 2001 From: sasirekha111 <101694902+sasirekha111@users.noreply.github.com> Date: Fri, 25 Mar 2022 22:51:59 +0530 Subject: [PATCH 01/17] Update main.yml --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 431ea35..154360c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,6 +7,7 @@ on: jobs: hello_world_job: runs-on: windows-latest + continue-on-error: true name: Build and Analyse steps: - uses: actions/checkout@v2 @@ -26,7 +27,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} LANG: JS - uses: applibgroup/HarmonyOs-build@v2.8 + uses: sasirekha111/HarmonyOs-build@v10.4 - name: Upload Artifact uses: actions/upload-artifact@v2 with: From 61a541d1ae3f3dc36399ae381ca90c5a830da3cd Mon Sep 17 00:00:00 2001 From: sasirekha111 <101694902+sasirekha111@users.noreply.github.com> Date: Fri, 25 Mar 2022 22:53:18 +0530 Subject: [PATCH 02/17] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 154360c..5c7fdb8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,7 +27,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} LANG: JS - uses: sasirekha111/HarmonyOs-build@v10.4 + uses: sasirekha111/HarmonyOs-build@v10.5 - name: Upload Artifact uses: actions/upload-artifact@v2 with: From 8642724424128830905b2b5b39d50055ba6830fe Mon Sep 17 00:00:00 2001 From: sasirekha111 <101694902+sasirekha111@users.noreply.github.com> Date: Fri, 25 Mar 2022 22:54:17 +0530 Subject: [PATCH 03/17] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5c7fdb8..db0c684 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,7 +27,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} LANG: JS - uses: sasirekha111/HarmonyOs-build@v10.5 + uses: sasirekha111/HarmonyOs-build@10.5 - name: Upload Artifact uses: actions/upload-artifact@v2 with: From 60bd229010bd6611c70fdd9e71fb660c899cf89f Mon Sep 17 00:00:00 2001 From: sasirekha111 <101694902+sasirekha111@users.noreply.github.com> Date: Fri, 25 Mar 2022 23:21:06 +0530 Subject: [PATCH 04/17] Update main.yml --- .github/workflows/main.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index db0c684..2c9a8d5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,16 +18,21 @@ jobs: with: java-version: '11' distribution: 'adopt' - - uses: actions/setup-node@v2 + - name: Use Node.js + uses: actions/setup-node@v2 with: node-version: '14' - - run: npm install - - id: main + - name: Install dependencies + run: npm install + - run: npm run build --if-present + - run: npm install eslint --global + - id: main env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} LANG: JS uses: sasirekha111/HarmonyOs-build@10.5 + continue-on-error: true - name: Upload Artifact uses: actions/upload-artifact@v2 with: From 84513c31e7468d1cc306d332aa63caa964814a91 Mon Sep 17 00:00:00 2001 From: sasirekha <101694902+sasirekha111@users.noreply.github.com> Date: Mon, 28 Mar 2022 17:41:38 +0530 Subject: [PATCH 05/17] Update build.gradle --- build.gradle | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/build.gradle b/build.gradle index 596901b..bbf2db6 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. apply plugin: 'com.huawei.ohos.app' -apply plugin: "org.sonarqube" + //For instructions on signature configuration, see https://developer.harmonyos.com/en/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510 ohos { @@ -19,7 +19,7 @@ buildscript { dependencies { classpath 'com.huawei.ohos:hap:3.0.3.4' classpath 'com.huawei.ohos:decctest:1.2.6.0' - classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.3" + } } @@ -32,13 +32,4 @@ allprojects { url 'https://developer.huawei.com/repo/' } } - sonarqube { - properties { - property "sonar.projectKey", "applibgroup_Buttons" - property "sonar.organization", "applibgroup" - property "sonar.host.url", "https://sonarcloud.io/" - property "sonar.sources", "entry/src" - property "sonar.java.binaries", "entry/build" - } -} -} + From 51cb5e1a1161ae8d4250f6c9993cbcf0f74dc3fd Mon Sep 17 00:00:00 2001 From: sasirekha <101694902+sasirekha111@users.noreply.github.com> Date: Tue, 29 Mar 2022 22:45:36 +0530 Subject: [PATCH 06/17] 12.13 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2c9a8d5..0f55f1c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,7 +31,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} LANG: JS - uses: sasirekha111/HarmonyOs-build@10.5 + uses: sasirekha111/HarmonyOs-build@12.13 continue-on-error: true - name: Upload Artifact uses: actions/upload-artifact@v2 From acd9556a3051815b0c915d6aa337355900e84dce Mon Sep 17 00:00:00 2001 From: sasirekha <101694902+sasirekha111@users.noreply.github.com> Date: Thu, 21 Apr 2022 16:32:00 +0530 Subject: [PATCH 07/17] v2.12 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0f55f1c..693b49d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,7 +31,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} LANG: JS - uses: sasirekha111/HarmonyOs-build@12.13 + uses: sasirekha111/HarmonyOs-build@v2.12 continue-on-error: true - name: Upload Artifact uses: actions/upload-artifact@v2 From 9ceab805f5b8133e82f384f431fb0277e28a2389 Mon Sep 17 00:00:00 2001 From: sasirekha <101694902+sasirekha111@users.noreply.github.com> Date: Thu, 21 Apr 2022 19:25:38 +0530 Subject: [PATCH 08/17] v2.12 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 693b49d..8032f68 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,7 +31,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} LANG: JS - uses: sasirekha111/HarmonyOs-build@v2.12 + uses: applibgroup/HarmonyOs-build@v2.12 continue-on-error: true - name: Upload Artifact uses: actions/upload-artifact@v2 From 5f3bd46da9297c8e16c4372b025c69f061e650bf Mon Sep 17 00:00:00 2001 From: sasirekha <101694902+sasirekha111@users.noreply.github.com> Date: Mon, 30 May 2022 17:31:51 +0530 Subject: [PATCH 09/17] Create labels.yaml --- .github/labels.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/labels.yaml diff --git a/.github/labels.yaml b/.github/labels.yaml new file mode 100644 index 0000000..a8db383 --- /dev/null +++ b/.github/labels.yaml @@ -0,0 +1,17 @@ +area: + - 'bug' + - 'important' + +kind: + - 'failing-test' + - 'cleanup' + +priority: + - 'low' + - 'high' + +tests: + - '**/*.test.ts' + +source: + - 'src/**' From 3a1cbed8d418f5724e3f5e4bcc04d2cc4259a182 Mon Sep 17 00:00:00 2001 From: sasirekha <101694902+sasirekha111@users.noreply.github.com> Date: Mon, 30 May 2022 17:33:09 +0530 Subject: [PATCH 10/17] Create issueComment.yml --- .github/workflows/issueComment.yml | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/issueComment.yml diff --git a/.github/workflows/issueComment.yml b/.github/workflows/issueComment.yml new file mode 100644 index 0000000..6859985 --- /dev/null +++ b/.github/workflows/issueComment.yml @@ -0,0 +1,31 @@ +name: "Test issue comments" +on: + issue_comment: + types: [created] + +jobs: + execute: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - run: npm install + - run: npm run build + - uses: ./ + with: + prow-commands: '/assign + /unassign + /approve + /retitle + /area + /kind + /priority + /remove + /lgtm + /close + /reopen + /lock + /milestone + /hold + /cc + /uncc' + github-token: "${{ secrets.GITHUB_TOKEN }}" From b6af360e8d34b595c6b69fda3d4e658959740841 Mon Sep 17 00:00:00 2001 From: sasirekha <101694902+sasirekha111@users.noreply.github.com> Date: Mon, 30 May 2022 17:33:53 +0530 Subject: [PATCH 11/17] Create lgtm-merger.yml --- .github/workflows/lgtm-merger.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/lgtm-merger.yml diff --git a/.github/workflows/lgtm-merger.yml b/.github/workflows/lgtm-merger.yml new file mode 100644 index 0000000..a3c2174 --- /dev/null +++ b/.github/workflows/lgtm-merger.yml @@ -0,0 +1,17 @@ +name: "Merge on lgtm label" +on: + schedule: + - cron: "*/20 * * * *" + +jobs: + execute: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - run: npm install + - run: npm run build + - uses: ./ + with: + jobs: 'lgtm' + github-token: "${{ secrets.GITHUB_TOKEN }}" + merge-method: 'squash' From 0024a5a2ef7fdc64eaf33d555f9e4d31aaf3cb20 Mon Sep 17 00:00:00 2001 From: sasirekha <101694902+sasirekha111@users.noreply.github.com> Date: Mon, 30 May 2022 17:34:25 +0530 Subject: [PATCH 12/17] Create onPr.yml --- .github/workflows/onPr.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/onPr.yml diff --git a/.github/workflows/onPr.yml b/.github/workflows/onPr.yml new file mode 100644 index 0000000..91b0c00 --- /dev/null +++ b/.github/workflows/onPr.yml @@ -0,0 +1,14 @@ +name: "Run Jobs on PR" +on: pull_request + +jobs: + execute: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - run: npm install + - run: npm run build + - uses: ./ + with: + jobs: 'lgtm' + github-token: "${{ secrets.GITHUB_TOKEN }}" From 7ed1e5bf6a85a46ad541ba970fe1fa90d4b220b1 Mon Sep 17 00:00:00 2001 From: sasirekha <101694902+sasirekha111@users.noreply.github.com> Date: Mon, 30 May 2022 17:34:57 +0530 Subject: [PATCH 13/17] Create prLabeler.yml --- .github/workflows/prLabeler.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/workflows/prLabeler.yml diff --git a/.github/workflows/prLabeler.yml b/.github/workflows/prLabeler.yml new file mode 100644 index 0000000..d89f0a3 --- /dev/null +++ b/.github/workflows/prLabeler.yml @@ -0,0 +1,12 @@ +name: "Label PRs from globs" +on: +- pull_request_target + +jobs: + triage: + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@main + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + configuration-path: .github/labels.yaml From 209ce7ae58b5e3e277fa1267f07701a415450c7b Mon Sep 17 00:00:00 2001 From: sasirekha <101694902+sasirekha111@users.noreply.github.com> Date: Mon, 30 May 2022 17:35:27 +0530 Subject: [PATCH 14/17] Create stale.yml --- .github/workflows/stale.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..0ccc265 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,19 @@ +name: Mark stale issues and pull requests + +on: + schedule: + - cron: "0 0 * * *" + +jobs: + stale: + + runs-on: ubuntu-latest + + steps: + - uses: actions/stale@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: 'Issue is stale' + stale-pr-message: 'Pull req is stale' + stale-issue-label: 'no-issue-activity' + stale-pr-label: 'no-pr-activity' From e26da727871daea152dc0c7b09ec2fb5c55ab6f8 Mon Sep 17 00:00:00 2001 From: sasirekha <101694902+sasirekha111@users.noreply.github.com> Date: Mon, 30 May 2022 17:36:05 +0530 Subject: [PATCH 15/17] Create test.yml --- .github/workflows/test.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..b59d082 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,12 @@ +name: "Build and test code" +on: [push, pull_request] + +jobs: + build-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - run: | + npm install + npm run build + npm run test From 06aa790b166bd1dc8c0b05de94f1eae57c1a8a0d Mon Sep 17 00:00:00 2001 From: sasirekha <101694902+sasirekha111@users.noreply.github.com> Date: Mon, 30 May 2022 17:38:36 +0530 Subject: [PATCH 16/17] Update package.json --- package.json | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 0967ef4..541cbe7 100644 --- a/package.json +++ b/package.json @@ -1 +1,50 @@ -{} +{ + "name": "prow-github-actions", + "version": "1.1.3", + "description": "Slash commands, jobs, and chat-ops for Github actions inspired by Kubernetes Prow", + "main": "lib/main.js", + "scripts": { + "build": "tsc", + "format": "prettier --write **/*.ts", + "format-check": "prettier --check **/*.ts", + "lint": "eslint src/**/*.ts", + "pack": "ncc build", + "test": "jest", + "test-all": "npm run build && npm run pack && npm test", + "all": "npm run build && npm run format && npm run lint && npm run pack && npm test" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/jpmcb/prow-github-actions.git" + }, + "keywords": [ + "actions", + "prow" + ], + "author": "John McBride", + "license": "MIT", + "dependencies": { + "@actions/core": "^1.2.6", + "@actions/github": "^2.1.1", + "@octokit/webhooks": "^7.2.0", + "minimatch": "^3.0.4" + }, + "devDependencies": { + "@types/jest": "^24.0.23", + "@types/js-yaml": "^3.12.3", + "@types/minimatch": "^3.0.3", + "@types/node": "^12.7.12", + "@typescript-eslint/parser": "^2.8.0", + "@zeit/ncc": "^0.20.5", + "eslint": "^5.16.0", + "eslint-plugin-github": "^2.0.0", + "eslint-plugin-jest": "^22.21.0", + "jest": "^26.6.3", + "jest-circus": "^26.6.3", + "js-yaml": "^3.13.1", + "nock": "^12.0.3", + "prettier": "^1.19.1", + "ts-jest": "^26.4.1", + "typescript": "^3.6.4" + } +} From 0399494501258741784813c3661bf7017353314f Mon Sep 17 00:00:00 2001 From: sasirekha <101694902+sasirekha111@users.noreply.github.com> Date: Mon, 30 May 2022 19:21:03 +0530 Subject: [PATCH 17/17] Delete main.yml --- .github/workflows/main.yml | 40 -------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 8032f68..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,40 +0,0 @@ -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - hello_world_job: - runs-on: windows-latest - continue-on-error: true - name: Build and Analyse - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Set up JDK 11 - uses: actions/setup-java@v2 - with: - java-version: '11' - distribution: 'adopt' - - name: Use Node.js - uses: actions/setup-node@v2 - with: - node-version: '14' - - name: Install dependencies - run: npm install - - run: npm run build --if-present - - run: npm install eslint --global - - id: main - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - LANG: JS - uses: applibgroup/HarmonyOs-build@v2.12 - continue-on-error: true - - name: Upload Artifact - uses: actions/upload-artifact@v2 - with: - name: assets-for-download - path: build\outputs\hap\debug\phone