Compare commits

..

No commits in common. "main" and "v3" have entirely different histories.
main ... v3

10 changed files with 6688 additions and 28501 deletions

View File

@ -23,20 +23,20 @@ jobs:
issue-number: ${{ steps.vars.outputs.issue-number }} issue-number: ${{ steps.vars.outputs.issue-number }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-node@v4 - uses: actions/setup-node@v3
with: with:
node-version: 20.x node-version: 16.x
cache: npm cache: npm
- run: npm ci - run: npm ci
- run: npm run build - run: npm run build
- run: npm run format-check - run: npm run format-check
- run: npm run lint - run: npm run lint
- run: npm run test - run: npm run test
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v3
with: with:
name: dist name: dist
path: dist path: dist
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v3
with: with:
name: action.yml name: action.yml
path: action.yml path: action.yml
@ -58,12 +58,12 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- if: matrix.target == 'built' || github.event_name == 'pull_request' - if: matrix.target == 'built' || github.event_name == 'pull_request'
uses: actions/download-artifact@v4 uses: actions/download-artifact@v3
with: with:
name: dist name: dist
path: dist path: dist
- if: matrix.target == 'built' || github.event_name == 'pull_request' - if: matrix.target == 'built' || github.event_name == 'pull_request'
uses: actions/download-artifact@v4 uses: actions/download-artifact@v3
with: with:
name: action.yml name: action.yml
path: . path: .
@ -123,12 +123,12 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/download-artifact@v4 - uses: actions/download-artifact@v3
with: with:
name: dist name: dist
path: dist path: dist
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v5
with: with:
token: ${{ secrets.ACTIONS_BOT_TOKEN }} token: ${{ secrets.ACTIONS_BOT_TOKEN }}
commit-message: Update distribution commit-message: Update distribution

View File

@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Slash Command Dispatch - name: Slash Command Dispatch
uses: peter-evans/slash-command-dispatch@v4 uses: peter-evans/slash-command-dispatch@v3
with: with:
token: ${{ secrets.ACTIONS_BOT_TOKEN }} token: ${{ secrets.ACTIONS_BOT_TOKEN }}
config: > config: >

View File

@ -64,7 +64,7 @@ jobs:
# Test create from template # Test create from template
- name: Render template - name: Render template
id: template id: template
uses: chuhlomin/render-template@v1.10 uses: chuhlomin/render-template@v1.8
with: with:
template: .github/comment-template.md template: .github/comment-template.md
vars: | vars: |
@ -78,7 +78,7 @@ jobs:
body: ${{ steps.template.outputs.result }} body: ${{ steps.template.outputs.result }}
- name: Add reaction - name: Add reaction
uses: peter-evans/create-or-update-comment@v4 uses: peter-evans/create-or-update-comment@v3
with: with:
repository: ${{ github.event.client_payload.github.payload.repository.full_name }} repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
comment-id: ${{ github.event.client_payload.github.payload.comment.id }} comment-id: ${{ github.event.client_payload.github.payload.comment.id }}

View File

@ -8,7 +8,7 @@ jobs:
# Test create # Test create
- name: Create comment - name: Create comment
uses: peter-evans/create-or-update-comment@v4 uses: peter-evans/create-or-update-comment@v3
id: couc id: couc
with: with:
token: ${{ secrets.ACTIONS_BOT_TOKEN }} token: ${{ secrets.ACTIONS_BOT_TOKEN }}
@ -23,7 +23,7 @@ jobs:
# Test update # Test update
- name: Update comment - name: Update comment
uses: peter-evans/create-or-update-comment@v4 uses: peter-evans/create-or-update-comment@v3
with: with:
token: ${{ secrets.ACTIONS_BOT_TOKEN }} token: ${{ secrets.ACTIONS_BOT_TOKEN }}
comment-id: ${{ steps.couc.outputs.comment-id }} comment-id: ${{ steps.couc.outputs.comment-id }}
@ -34,7 +34,7 @@ jobs:
# Test add reactions # Test add reactions
- name: Add reactions - name: Add reactions
uses: peter-evans/create-or-update-comment@v4 uses: peter-evans/create-or-update-comment@v3
with: with:
token: ${{ secrets.ACTIONS_BOT_TOKEN }} token: ${{ secrets.ACTIONS_BOT_TOKEN }}
comment-id: ${{ steps.couc.outputs.comment-id }} comment-id: ${{ steps.couc.outputs.comment-id }}
@ -42,7 +42,7 @@ jobs:
# Test create with body from file # Test create with body from file
- name: Create comment - name: Create comment
uses: peter-evans/create-or-update-comment@v4 uses: peter-evans/create-or-update-comment@v3
with: with:
token: ${{ secrets.ACTIONS_BOT_TOKEN }} token: ${{ secrets.ACTIONS_BOT_TOKEN }}
issue-number: 1 issue-number: 1
@ -51,7 +51,7 @@ jobs:
# Test create from template # Test create from template
- name: Render template - name: Render template
id: template id: template
uses: chuhlomin/render-template@v1.10 uses: chuhlomin/render-template@v1.8
with: with:
template: .github/comment-template.md template: .github/comment-template.md
vars: | vars: |
@ -59,7 +59,7 @@ jobs:
bar: that bar: that
- name: Create comment - name: Create comment
uses: peter-evans/create-or-update-comment@v4 uses: peter-evans/create-or-update-comment@v3
with: with:
token: ${{ secrets.ACTIONS_BOT_TOKEN }} token: ${{ secrets.ACTIONS_BOT_TOKEN }}
issue-number: 1 issue-number: 1

View File

@ -11,8 +11,8 @@ on:
type: choice type: choice
description: The major version tag to update description: The major version tag to update
options: options:
- v2
- v3 - v3
- v4
jobs: jobs:
tag: tag:

View File

@ -10,7 +10,7 @@ A GitHub action to create or update an issue or pull request comment.
```yml ```yml
- name: Create comment - name: Create comment
uses: peter-evans/create-or-update-comment@v4 uses: peter-evans/create-or-update-comment@v3
with: with:
issue-number: 1 issue-number: 1
body: | body: |
@ -26,7 +26,7 @@ A GitHub action to create or update an issue or pull request comment.
```yml ```yml
- name: Update comment - name: Update comment
uses: peter-evans/create-or-update-comment@v4 uses: peter-evans/create-or-update-comment@v3
with: with:
comment-id: 557858210 comment-id: 557858210
body: | body: |
@ -38,7 +38,7 @@ A GitHub action to create or update an issue or pull request comment.
```yml ```yml
- name: Add reactions - name: Add reactions
uses: peter-evans/create-or-update-comment@v4 uses: peter-evans/create-or-update-comment@v3
with: with:
comment-id: 557858210 comment-id: 557858210
reactions: | reactions: |
@ -73,7 +73,7 @@ Note that in order to read the step output the action step must have an id.
```yml ```yml
- name: Create comment - name: Create comment
uses: peter-evans/create-or-update-comment@v4 uses: peter-evans/create-or-update-comment@v3
id: couc id: couc
with: with:
issue-number: 1 issue-number: 1
@ -98,7 +98,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Add reaction - name: Add reaction
uses: peter-evans/create-or-update-comment@v4 uses: peter-evans/create-or-update-comment@v3
with: with:
comment-id: ${{ github.event.comment.id }} comment-id: ${{ github.event.comment.id }}
reactions: eyes reactions: eyes
@ -113,7 +113,7 @@ If the find-comment action output `comment-id` returns an empty string, a new co
If it returns a value, the comment already exists and the content is replaced. If it returns a value, the comment already exists and the content is replaced.
```yml ```yml
- name: Find Comment - name: Find Comment
uses: peter-evans/find-comment@v3 uses: peter-evans/find-comment@v2
id: fc id: fc
with: with:
issue-number: ${{ github.event.pull_request.number }} issue-number: ${{ github.event.pull_request.number }}
@ -121,7 +121,7 @@ If it returns a value, the comment already exists and the content is replaced.
body-includes: Build output body-includes: Build output
- name: Create or update comment - name: Create or update comment
uses: peter-evans/create-or-update-comment@v4 uses: peter-evans/create-or-update-comment@v3
with: with:
comment-id: ${{ steps.fc.outputs.comment-id }} comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }} issue-number: ${{ github.event.pull_request.number }}
@ -134,7 +134,7 @@ If it returns a value, the comment already exists and the content is replaced.
If required, the create and update steps can be separated for greater control. If required, the create and update steps can be separated for greater control.
```yml ```yml
- name: Find Comment - name: Find Comment
uses: peter-evans/find-comment@v3 uses: peter-evans/find-comment@v2
id: fc id: fc
with: with:
issue-number: ${{ github.event.pull_request.number }} issue-number: ${{ github.event.pull_request.number }}
@ -143,7 +143,7 @@ If required, the create and update steps can be separated for greater control.
- name: Create comment - name: Create comment
if: steps.fc.outputs.comment-id == '' if: steps.fc.outputs.comment-id == ''
uses: peter-evans/create-or-update-comment@v4 uses: peter-evans/create-or-update-comment@v3
with: with:
issue-number: ${{ github.event.pull_request.number }} issue-number: ${{ github.event.pull_request.number }}
body: | body: |
@ -152,7 +152,7 @@ If required, the create and update steps can be separated for greater control.
- name: Update comment - name: Update comment
if: steps.fc.outputs.comment-id != '' if: steps.fc.outputs.comment-id != ''
uses: peter-evans/create-or-update-comment@v4 uses: peter-evans/create-or-update-comment@v3
with: with:
comment-id: ${{ steps.fc.outputs.comment-id }} comment-id: ${{ steps.fc.outputs.comment-id }}
body: | body: |
@ -164,7 +164,7 @@ If required, the create and update steps can be separated for greater control.
```yml ```yml
- name: Create comment - name: Create comment
uses: peter-evans/create-or-update-comment@v4 uses: peter-evans/create-or-update-comment@v3
with: with:
issue-number: 1 issue-number: 1
body-path: 'comment-body.md' body-path: 'comment-body.md'
@ -190,7 +190,7 @@ The template is rendered using the [render-template](https://github.com/chuhlomi
bar: that bar: that
- name: Create comment - name: Create comment
uses: peter-evans/create-or-update-comment@v4 uses: peter-evans/create-or-update-comment@v3
with: with:
issue-number: 1 issue-number: 1
body: ${{ steps.template.outputs.result }} body: ${{ steps.template.outputs.result }}

View File

@ -32,7 +32,7 @@ outputs:
comment-id: comment-id:
description: 'The id of the created comment' description: 'The id of the created comment'
runs: runs:
using: 'node20' using: 'node16'
main: 'dist/index.js' main: 'dist/index.js'
branding: branding:
icon: 'message-square' icon: 'message-square'

34080
dist/index.js vendored

File diff suppressed because one or more lines are too long

935
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "create-or-update-comment", "name": "create-or-update-comment",
"version": "4.0.0", "version": "3.0.0",
"description": "Create or update an issue or pull request comment", "description": "Create or update an issue or pull request comment",
"main": "lib/main.js", "main": "lib/main.js",
"scripts": { "scripts": {
@ -27,23 +27,23 @@
}, },
"homepage": "https://github.com/peter-evans/create-or-update-comment#readme", "homepage": "https://github.com/peter-evans/create-or-update-comment#readme",
"dependencies": { "dependencies": {
"@actions/core": "^1.11.1", "@actions/core": "^1.10.1",
"@actions/github": "^6.0.0" "@actions/github": "^5.1.1"
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^27.0.3", "@types/jest": "^27.0.3",
"@types/node": "^18.19.86", "@types/node": "^18.18.5",
"@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0", "@typescript-eslint/parser": "^5.62.0",
"@vercel/ncc": "^0.38.3", "@vercel/ncc": "^0.38.0",
"eslint": "^8.57.1", "eslint": "^8.51.0",
"eslint-plugin-github": "^4.10.2", "eslint-plugin-github": "^4.10.1",
"eslint-plugin-jest": "^27.9.0", "eslint-plugin-jest": "^27.4.2",
"eslint-plugin-prettier": "^5.2.6", "eslint-plugin-prettier": "^5.0.1",
"jest": "^27.5.1", "jest": "^27.5.1",
"jest-circus": "^27.5.1", "jest-circus": "^27.5.1",
"js-yaml": "^4.1.0", "js-yaml": "^4.1.0",
"prettier": "^3.5.3", "prettier": "^3.0.3",
"ts-jest": "^27.1.5", "ts-jest": "^27.1.5",
"typescript": "^4.9.5" "typescript": "^4.9.5"
} }