You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes PR label and Comment Issue and also for Issue. (#105)
* Fixed Worflows of autocomment on prs
* Rename Contributing.md
* Rename Readme, Contributing and added Code_of_conduct.md
* Fixed The workflows to run on different branch PR.
* Revert "Fixed The workflows to run on different branch PR."
This reverts commit 482bf40.
* Fix PR label and Comment Issue and for Issues Also
Copy file name to clipboardExpand all lines: .github/workflows/comment-on-issues.yml
+9-2Lines changed: 9 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,13 @@ jobs:
14
14
- name: Checkout repository
15
15
uses: actions/checkout@v3
16
16
17
+
- name: Check if author is not repository owner
18
+
run: |
19
+
if [[ ${{ github.event.issue.user.login }} == ${{ github.repository_owner }} ]]; then
20
+
echo "Author is repository owner. Skipping comment workflow."
21
+
exit 0
22
+
fi
23
+
17
24
- name: Add Comment
18
25
uses: actions/github-script@v4
19
26
with:
@@ -22,7 +29,7 @@ jobs:
22
29
const { issue } = context.payload;
23
30
const author = issue.user.login;
24
31
const issueNumber = issue.number;
25
-
const comment = `Hello @${author}! \n Thank you for raising this issue. \n\nPlease make sure to follow our [Contributing Guidelines. 💪🏻](https://github.com/CatsInTech/GitHub-ReadMe/blob/main/Contributing.md) \nDon't forget to ⭐ our [GitHub-ReadMe. 📃](https://github.com/CatsInTech/GitHub-ReadMe)\n\nOur review team will carefully assess the issue and reach out to you soon! 😇 \n We appreciate your patience! 😀`;
32
+
const comment = `Hello @${author}! \n Thank you for raising this issue. \n\nPlease make sure to follow our [Contributing Guidelines. 💪🏻](https://github.com/CatsInTech/GitHub-ReadMe/blob/main/CONTRIBUTING.md) \nDon't forget to ⭐ our [GitHub-ReadMe. 📃](https://github.com/CatsInTech/GitHub-ReadMe)\n\nOur review team will carefully assess the issue and reach out to you soon! 😇 \n We appreciate your patience! 😀`;
26
33
const { owner, repo } = context.repo;
27
34
28
35
await github.issues.createComment({
@@ -32,4 +39,4 @@ jobs:
32
39
body: comment
33
40
});
34
41
35
-
console.log(`Comment added to the Issue #${issueNumber}.`);
42
+
console.log(`Comment added to the Issue #${issueNumber}.`);
0 commit comments