mirror of
https://github.com/mshick/add-pr-comment.git
synced 2025-12-31 22:29:45 +11:00
feat: only provide info logging when comments are not created
This commit is contained in:
parent
f97d0a5363
commit
a43c7002b8
2 changed files with 7 additions and 4 deletions
7
.github/workflows/test-pr.yml
vendored
7
.github/workflows/test-pr.yml
vendored
|
|
@ -6,8 +6,11 @@ jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- name: Checkout
|
||||||
- uses: ./
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Add Comment
|
||||||
|
uses: ./
|
||||||
with:
|
with:
|
||||||
message: |
|
message: |
|
||||||
**Hello PULL!**
|
**Hello PULL!**
|
||||||
|
|
|
||||||
4
index.js
4
index.js
|
|
@ -47,7 +47,7 @@ async function run() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!issueNumber) {
|
if (!issueNumber) {
|
||||||
core.warning(
|
core.info(
|
||||||
"this action only works on pull_request events or other commits associated with a pull"
|
"this action only works on pull_request events or other commits associated with a pull"
|
||||||
);
|
);
|
||||||
core.setOutput("comment-created", "false");
|
core.setOutput("comment-created", "false");
|
||||||
|
|
@ -72,7 +72,7 @@ async function run() {
|
||||||
);
|
);
|
||||||
|
|
||||||
if (filteredComments.length) {
|
if (filteredComments.length) {
|
||||||
core.warning("the issue already contains this message");
|
core.info("the issue already contains this message");
|
||||||
core.setOutput("comment-created", "false");
|
core.setOutput("comment-created", "false");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue