From 142485a9a8ddfab450975e3bacc0074c27cad208 Mon Sep 17 00:00:00 2001 From: Edgard Lorraine Messias Date: Mon, 22 May 2023 16:56:03 -0300 Subject: [PATCH 1/6] ci: Added a pull-request comment for approval helping --- .github/workflows/pr-comment.yml | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/pr-comment.yml diff --git a/.github/workflows/pr-comment.yml b/.github/workflows/pr-comment.yml new file mode 100644 index 0000000..b4233a1 --- /dev/null +++ b/.github/workflows/pr-comment.yml @@ -0,0 +1,37 @@ +name: PR Comment + +on: + pull_request: + types: + - opened + - synchronize + - reopened + - unlocked + +permissions: + pull-requests: write + +jobs: + pr-comment: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v3 + + - uses: mshick/add-pr-comment@v2 + with: + message-id: pr-test + message: | + Thanks for your contribution. + + The next step is to wait for review and approval to merge it to main repository + + The community can help reacting with a thumb up (:thumbsup:) for approval and rocket (:rocket:) for who has tested it. + + To test this PR you can run the following command below: + ``` + # NPM + npm install @whiskeysockets/baileys@${{ github.event.pull_request.head.repo.full_name }}#${{ github.event.pull_request.head.ref }} + # YARN v2 + yarn add @whiskeysockets/baileys@${{ github.event.pull_request.head.repo.full_name }}#${{ github.event.pull_request.head.ref }} + ``` From 5ff88d82a17062ab3446712d8cd9c6d48b1d7ac8 Mon Sep 17 00:00:00 2001 From: Edgard Lorraine Messias Date: Mon, 22 May 2023 16:59:10 -0300 Subject: [PATCH 2/6] fix: Fixed installation from Yarn v2 (close #41) --- .npmignore | 0 package.json | 1 + 2 files changed, 1 insertion(+) create mode 100644 .npmignore diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..e69de29 diff --git a/package.json b/package.json index e76bf9e..74e251c 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "gen:protobuf": "sh WAProto/GenerateStatics.sh", "lint": "eslint . --ext .js,.ts,.jsx,.tsx", "lint:fix": "eslint . --fix --ext .js,.ts,.jsx,.tsx", + "prepack": "tsc", "prepare": "tsc", "release": "release-it", "test": "jest" From ee8d2bf175a088979d3492d6b113f5b8fbbffee4 Mon Sep 17 00:00:00 2001 From: Edgard Lorraine Messias Date: Mon, 22 May 2023 17:07:45 -0300 Subject: [PATCH 3/6] ci: Fixed permission for pr-comment --- .github/workflows/pr-comment.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-comment.yml b/.github/workflows/pr-comment.yml index b4233a1..63e425f 100644 --- a/.github/workflows/pr-comment.yml +++ b/.github/workflows/pr-comment.yml @@ -8,13 +8,14 @@ on: - reopened - unlocked -permissions: - pull-requests: write - jobs: pr-comment: runs-on: ubuntu-latest timeout-minutes: 10 + permissions: + contents: read + issues: write + pull-requests: write steps: - uses: actions/checkout@v3 From d0bd9ed3275d0af9a46e7a9312d3e16e29ecdb04 Mon Sep 17 00:00:00 2001 From: Edgard Lorraine Messias Date: Mon, 22 May 2023 17:14:20 -0300 Subject: [PATCH 4/6] ci: Use secrets.GITHUB_TOKEN --- .github/workflows/pr-comment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-comment.yml b/.github/workflows/pr-comment.yml index 63e425f..09ffd53 100644 --- a/.github/workflows/pr-comment.yml +++ b/.github/workflows/pr-comment.yml @@ -21,6 +21,7 @@ jobs: - uses: mshick/add-pr-comment@v2 with: + repo-token: ${{ secrets.GITHUB_TOKEN}} message-id: pr-test message: | Thanks for your contribution. From d69bdcfc17b2114abc105c3770f4ebc946595891 Mon Sep 17 00:00:00 2001 From: Edgard Lorraine Messias Date: Mon, 22 May 2023 17:27:20 -0300 Subject: [PATCH 5/6] ci: Fix pr-comment.yml --- .github/workflows/pr-comment.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/pr-comment.yml b/.github/workflows/pr-comment.yml index 09ffd53..8559d10 100644 --- a/.github/workflows/pr-comment.yml +++ b/.github/workflows/pr-comment.yml @@ -12,10 +12,7 @@ jobs: pr-comment: runs-on: ubuntu-latest timeout-minutes: 10 - permissions: - contents: read - issues: write - pull-requests: write + permissions: write-all steps: - uses: actions/checkout@v3 From 45ce344326a410f90b2ed2913d2a25e219f7a59d Mon Sep 17 00:00:00 2001 From: Edgard Lorraine Messias Date: Mon, 22 May 2023 17:36:06 -0300 Subject: [PATCH 6/6] ci: Use personal token instead of GITHUB_TOKEN --- .github/workflows/pr-comment.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-comment.yml b/.github/workflows/pr-comment.yml index 8559d10..6fea527 100644 --- a/.github/workflows/pr-comment.yml +++ b/.github/workflows/pr-comment.yml @@ -1,7 +1,7 @@ name: PR Comment on: - pull_request: + pull_request_target: types: - opened - synchronize @@ -18,7 +18,7 @@ jobs: - uses: mshick/add-pr-comment@v2 with: - repo-token: ${{ secrets.GITHUB_TOKEN}} + repo-token: ${{ secrets.PERSONAL_TOKEN}} message-id: pr-test message: | Thanks for your contribution.