Skip to content

Commit 1677a11

Browse files
comment the workflow
1 parent 387e64e commit 1677a11

File tree

7 files changed

+265
-265
lines changed

7 files changed

+265
-265
lines changed
Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
name: Auto Comment on PR Merge
1+
# name: Auto Comment on PR Merge
22

3-
on:
4-
pull_request:
5-
types: [closed]
3+
# on:
4+
# pull_request:
5+
# types: [closed]
66

7-
jobs:
8-
comment:
9-
if: github.event.pull_request.merged == true
10-
runs-on: ubuntu-latest
7+
# jobs:
8+
# comment:
9+
# if: github.event.pull_request.merged == true
10+
# runs-on: ubuntu-latest
1111

12-
steps:
13-
- name: Add Comment to Merged PR
14-
env:
15-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16-
run: |
17-
curl -H "Authorization: token $GITHUB_TOKEN" \
18-
-X POST \
19-
-d '{"body":"🎉 Your pull request has been successfully merged! 🎉 Thank you for your contribution to our project. Your efforts are greatly appreciated. Keep up the fantastic work! 🚀"}' \
20-
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments"
12+
# steps:
13+
# - name: Add Comment to Merged PR
14+
# env:
15+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16+
# run: |
17+
# curl -H "Authorization: token $GITHUB_TOKEN" \
18+
# -X POST \
19+
# -d '{"body":"🎉 Your pull request has been successfully merged! 🎉 Thank you for your contribution to our project. Your efforts are greatly appreciated. Keep up the fantastic work! 🚀"}' \
20+
# "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments"
Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
1-
name: Check for Duplicates and Close Issues on PR Merge
1+
# name: Check for Duplicates and Close Issues on PR Merge
22

3-
on:
4-
pull_request:
5-
types: [opened, synchronize, closed]
3+
# on:
4+
# pull_request:
5+
# types: [opened, synchronize, closed]
66

7-
jobs:
8-
check-duplicates:
9-
runs-on: ubuntu-latest
10-
steps:
11-
- name: Checkout repository
12-
uses: actions/checkout@v2
7+
# jobs:
8+
# check-duplicates:
9+
# runs-on: ubuntu-latest
10+
# steps:
11+
# - name: Checkout repository
12+
# uses: actions/checkout@v2
1313

14-
- name: Check for duplicate entries in product.json
15-
run: |
16-
# Check for duplicate entries based on the 'link' field in product.json
17-
jq -r '.[].link' product.json | sort | uniq -d > duplicates.txt
18-
if [ -s duplicates.txt ]; then
19-
echo "Duplicate entries found in product.json based on 'link':"
20-
cat duplicates.txt
21-
exit 1
22-
else
23-
echo "No duplicate entries found based on 'link'."
24-
fi
14+
# - name: Check for duplicate entries in product.json
15+
# run: |
16+
# # Check for duplicate entries based on the 'link' field in product.json
17+
# jq -r '.[].link' product.json | sort | uniq -d > duplicates.txt
18+
# if [ -s duplicates.txt ]; then
19+
# echo "Duplicate entries found in product.json based on 'link':"
20+
# cat duplicates.txt
21+
# exit 1
22+
# else
23+
# echo "No duplicate entries found based on 'link'."
24+
# fi
2525

26-
close-issues:
27-
runs-on: ubuntu-latest
28-
needs: check-duplicates
29-
if: github.event.pull_request.merged == true
26+
# close-issues:
27+
# runs-on: ubuntu-latest
28+
# needs: check-duplicates
29+
# if: github.event.pull_request.merged == true
3030

31-
steps:
32-
- name: Checkout repository
33-
uses: actions/checkout@v2
31+
# steps:
32+
# - name: Checkout repository
33+
# uses: actions/checkout@v2
3434

35-
- name: Close linked issues
36-
run: |
37-
ISSUES=$(jq -r '.pull_request.body' "$GITHUB_EVENT_PATH" | grep -Eo '#[0-9]+' | tr -d '#')
38-
for ISSUE in $ISSUES
39-
do
40-
echo "Closing issue #$ISSUE"
41-
curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
42-
-H "Accept: application/vnd.github.v3+json" \
43-
https://api.github.com/repos/${{ github.repository }}/issues/$ISSUE/comments \
44-
-d '{"body":"Closed by PR #${{ github.event.pull_request.number }}"}'
45-
curl -X PATCH -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
46-
-H "Accept: application/vnd.github.v3+json" \
47-
https://api.github.com/repos/${{ github.repository }}/issues/$ISSUE \
48-
-d '{"state":"closed"}'
49-
done
35+
# - name: Close linked issues
36+
# run: |
37+
# ISSUES=$(jq -r '.pull_request.body' "$GITHUB_EVENT_PATH" | grep -Eo '#[0-9]+' | tr -d '#')
38+
# for ISSUE in $ISSUES
39+
# do
40+
# echo "Closing issue #$ISSUE"
41+
# curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
42+
# -H "Accept: application/vnd.github.v3+json" \
43+
# https://api.github.com/repos/${{ github.repository }}/issues/$ISSUE/comments \
44+
# -d '{"body":"Closed by PR #${{ github.event.pull_request.number }}"}'
45+
# curl -X PATCH -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
46+
# -H "Accept: application/vnd.github.v3+json" \
47+
# https://api.github.com/repos/${{ github.repository }}/issues/$ISSUE \
48+
# -d '{"state":"closed"}'
49+
# done
Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
1-
name: Close Stale PRs
1+
# name: Close Stale PRs
22

3-
on:
4-
schedule:
5-
- cron: '0 0 * * *' # Runs daily at midnight
6-
pull_request:
7-
types:
8-
- opened
9-
- reopened
10-
- synchronize
3+
# on:
4+
# schedule:
5+
# - cron: '0 0 * * *' # Runs daily at midnight
6+
# pull_request:
7+
# types:
8+
# - opened
9+
# - reopened
10+
# - synchronize
1111

12-
permissions:
13-
pull-requests: write
14-
issues: write
12+
# permissions:
13+
# pull-requests: write
14+
# issues: write
1515

16-
jobs:
17-
close_stale_prs:
18-
runs-on: ubuntu-latest
19-
permissions:
20-
pull-requests: write
16+
# jobs:
17+
# close_stale_prs:
18+
# runs-on: ubuntu-latest
19+
# permissions:
20+
# pull-requests: write
2121

22-
steps:
23-
- uses: actions/stale@v7
24-
with:
25-
repo-token: ${{ secrets.GITHUB_TOKEN }}
26-
stale-pr-message: 'This PR has been automatically closed due to inactivity from the owner for 15 days.'
27-
days-before-pr-stale: 15
28-
days-before-pr-close: 0
29-
exempt-pr-author: false
30-
exempt-pr-labels: ''
31-
only-labels: ''
32-
operations-per-run: 30
33-
remove-stale-when-updated: true
34-
debug-only: false
22+
# steps:
23+
# - uses: actions/stale@v7
24+
# with:
25+
# repo-token: ${{ secrets.GITHUB_TOKEN }}
26+
# stale-pr-message: 'This PR has been automatically closed due to inactivity from the owner for 15 days.'
27+
# days-before-pr-stale: 15
28+
# days-before-pr-close: 0
29+
# exempt-pr-author: false
30+
# exempt-pr-labels: ''
31+
# only-labels: ''
32+
# operations-per-run: 30
33+
# remove-stale-when-updated: true
34+
# debug-only: false
Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
name: Close Issues on PR Merge
1+
# name: Close Issues on PR Merge
22

3-
on:
4-
pull_request:
5-
types: [closed]
3+
# on:
4+
# pull_request:
5+
# types: [closed]
66

7-
jobs:
8-
close-issues:
9-
runs-on: ubuntu-latest
7+
# # jobs:
8+
# close-issues:
9+
# runs-on: ubuntu-latest
1010

11-
steps:
12-
- name: Checkout repository
13-
uses: actions/checkout@v2
11+
# steps:
12+
# - name: Checkout repository
13+
# uses: actions/checkout@v2
1414

15-
- name: Close linked issues
16-
if: github.event.pull_request.merged == true
17-
run: |
18-
ISSUES=$(jq -r '.pull_request.body' "$GITHUB_EVENT_PATH" | grep -Eo '#[0-9]+' | tr -d '#')
19-
for ISSUE in $ISSUES
20-
do
21-
echo "Closing issue #$ISSUE"
22-
curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
23-
-H "Accept: application/vnd.github.v3+json" \
24-
https://api.github.com/repos/${{ github.repository }}/issues/$ISSUE/comments \
25-
-d '{"body":"Closed by PR #${{ github.event.pull_request.number }}"}'
26-
curl -X PATCH -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
27-
-H "Accept: application/vnd.github.v3+json" \
28-
https://api.github.com/repos/${{ github.repository }}/issues/$ISSUE \
29-
-d '{"state":"closed"}'
30-
done
15+
# - name: Close linked issues
16+
# if: github.event.pull_request.merged == true
17+
# run: |
18+
# ISSUES=$(jq -r '.pull_request.body' "$GITHUB_EVENT_PATH" | grep -Eo '#[0-9]+' | tr -d '#')
19+
# for ISSUE in $ISSUES
20+
# do
21+
# echo "Closing issue #$ISSUE"
22+
# curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
23+
# -H "Accept: application/vnd.github.v3+json" \
24+
# https://api.github.com/repos/${{ github.repository }}/issues/$ISSUE/comments \
25+
# -d '{"body":"Closed by PR #${{ github.event.pull_request.number }}"}'
26+
# curl -X PATCH -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
27+
# -H "Accept: application/vnd.github.v3+json" \
28+
# https://api.github.com/repos/${{ github.repository }}/issues/$ISSUE \
29+
# -d '{"state":"closed"}'
30+
# done

.github/workflows/greetings.yaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
name: Greetings
1+
# name: Greetings
22

3-
on: [pull_request_target, issues]
3+
# on: [pull_request_target, issues]
44

5-
jobs:
6-
greeting:
7-
runs-on: ubuntu-latest
8-
permissions:
9-
issues: write
10-
pull-requests: write
11-
steps:
12-
- uses: actions/first-interaction@v1
13-
with:
14-
repo-token: ${{ secrets.GITHUB_TOKEN }}
15-
issue-message: "Hi there! Thanks for opening this issue. We appreciate your contribution to this open-source project. We aim to respond or assign your issue as soon as possible."
16-
pr-message: "Welcome to Our repository.🎊 Thank you so much for taking the time to point this out."
5+
# jobs:
6+
# greeting:
7+
# runs-on: ubuntu-latest
8+
# permissions:
9+
# issues: write
10+
# pull-requests: write
11+
# steps:
12+
# - uses: actions/first-interaction@v1
13+
# with:
14+
# repo-token: ${{ secrets.GITHUB_TOKEN }}
15+
# issue-message: "Hi there! Thanks for opening this issue. We appreciate your contribution to this open-source project. We aim to respond or assign your issue as soon as possible."
16+
# pr-message: "Welcome to Our repository.🎊 Thank you so much for taking the time to point this out."

.github/workflows/greetings.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
name: 'Greetings'
1+
# name: 'Greetings'
22

3-
on:
4-
fork:
5-
push:
6-
branches: [main]
7-
issues:
8-
types: [opened]
9-
pull_request_target:
10-
types: [opened]
3+
# on:
4+
# fork:
5+
# push:
6+
# branches: [main]
7+
# issues:
8+
# types: [opened]
9+
# pull_request_target:
10+
# types: [opened]
1111

12-
jobs:
13-
welcome:
14-
runs-on: ubuntu-latest
15-
steps:
16-
- uses: actions/checkout@v1
17-
- uses: EddieHubCommunity/gh-action-community/src/welcome@main
18-
with:
19-
github-token: ${{ secrets.GITHUB_TOKEN }}
20-
issue-message: |
21-
Congratulations, @${{ github.actor }}! 🎉 Thank you for creating your issue. Your contribution is greatly appreciated and we look forward to working with you to resolve the issue. Keep up the great work!
22-
pr-message: |
23-
Great job, @${{ github.actor }}! 🎉 Thank you for submitting your pull request. Your contribution is valuable and we appreciate your efforts to improve our project.
24-
footer: 'We will promptly review your changes and offer feedback. Keep up the excellent work! Kindly remember to check our [contributing guidelines](https://github.com/HimanshuNarware/Devlabs/blob/main/CONTRIBUTING.md)'
12+
# jobs:
13+
# welcome:
14+
# runs-on: ubuntu-latest
15+
# steps:
16+
# - uses: actions/checkout@v1
17+
# - uses: EddieHubCommunity/gh-action-community/src/welcome@main
18+
# with:
19+
# github-token: ${{ secrets.GITHUB_TOKEN }}
20+
# issue-message: |
21+
# Congratulations, @${{ github.actor }}! 🎉 Thank you for creating your issue. Your contribution is greatly appreciated and we look forward to working with you to resolve the issue. Keep up the great work!
22+
# pr-message: |
23+
# Great job, @${{ github.actor }}! 🎉 Thank you for submitting your pull request. Your contribution is valuable and we appreciate your efforts to improve our project.
24+
# footer: 'We will promptly review your changes and offer feedback. Keep up the excellent work! Kindly remember to check our [contributing guidelines](https://github.com/HimanshuNarware/Devlabs/blob/main/CONTRIBUTING.md)'

0 commit comments

Comments
 (0)