-
-
Notifications
You must be signed in to change notification settings - Fork 260
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
387e64e
commit 1677a11
Showing
7 changed files
with
265 additions
and
265 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
name: Auto Comment on PR Merge | ||
# name: Auto Comment on PR Merge | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
# on: | ||
# pull_request: | ||
# types: [closed] | ||
|
||
jobs: | ||
comment: | ||
if: github.event.pull_request.merged == true | ||
runs-on: ubuntu-latest | ||
# jobs: | ||
# comment: | ||
# if: github.event.pull_request.merged == true | ||
# runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Add Comment to Merged PR | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
curl -H "Authorization: token $GITHUB_TOKEN" \ | ||
-X POST \ | ||
-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! 🚀"}' \ | ||
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments" | ||
# steps: | ||
# - name: Add Comment to Merged PR | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# run: | | ||
# curl -H "Authorization: token $GITHUB_TOKEN" \ | ||
# -X POST \ | ||
# -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! 🚀"}' \ | ||
# "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,49 @@ | ||
name: Check for Duplicates and Close Issues on PR Merge | ||
# name: Check for Duplicates and Close Issues on PR Merge | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, closed] | ||
# on: | ||
# pull_request: | ||
# types: [opened, synchronize, closed] | ||
|
||
jobs: | ||
check-duplicates: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
# jobs: | ||
# check-duplicates: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Checkout repository | ||
# uses: actions/checkout@v2 | ||
|
||
- name: Check for duplicate entries in product.json | ||
run: | | ||
# Check for duplicate entries based on the 'link' field in product.json | ||
jq -r '.[].link' product.json | sort | uniq -d > duplicates.txt | ||
if [ -s duplicates.txt ]; then | ||
echo "Duplicate entries found in product.json based on 'link':" | ||
cat duplicates.txt | ||
exit 1 | ||
else | ||
echo "No duplicate entries found based on 'link'." | ||
fi | ||
# - name: Check for duplicate entries in product.json | ||
# run: | | ||
# # Check for duplicate entries based on the 'link' field in product.json | ||
# jq -r '.[].link' product.json | sort | uniq -d > duplicates.txt | ||
# if [ -s duplicates.txt ]; then | ||
# echo "Duplicate entries found in product.json based on 'link':" | ||
# cat duplicates.txt | ||
# exit 1 | ||
# else | ||
# echo "No duplicate entries found based on 'link'." | ||
# fi | ||
|
||
close-issues: | ||
runs-on: ubuntu-latest | ||
needs: check-duplicates | ||
if: github.event.pull_request.merged == true | ||
# close-issues: | ||
# runs-on: ubuntu-latest | ||
# needs: check-duplicates | ||
# if: github.event.pull_request.merged == true | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
# steps: | ||
# - name: Checkout repository | ||
# uses: actions/checkout@v2 | ||
|
||
- name: Close linked issues | ||
run: | | ||
ISSUES=$(jq -r '.pull_request.body' "$GITHUB_EVENT_PATH" | grep -Eo '#[0-9]+' | tr -d '#') | ||
for ISSUE in $ISSUES | ||
do | ||
echo "Closing issue #$ISSUE" | ||
curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
https://api.github.com/repos/${{ github.repository }}/issues/$ISSUE/comments \ | ||
-d '{"body":"Closed by PR #${{ github.event.pull_request.number }}"}' | ||
curl -X PATCH -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
https://api.github.com/repos/${{ github.repository }}/issues/$ISSUE \ | ||
-d '{"state":"closed"}' | ||
done | ||
# - name: Close linked issues | ||
# run: | | ||
# ISSUES=$(jq -r '.pull_request.body' "$GITHUB_EVENT_PATH" | grep -Eo '#[0-9]+' | tr -d '#') | ||
# for ISSUE in $ISSUES | ||
# do | ||
# echo "Closing issue #$ISSUE" | ||
# curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
# -H "Accept: application/vnd.github.v3+json" \ | ||
# https://api.github.com/repos/${{ github.repository }}/issues/$ISSUE/comments \ | ||
# -d '{"body":"Closed by PR #${{ github.event.pull_request.number }}"}' | ||
# curl -X PATCH -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
# -H "Accept: application/vnd.github.v3+json" \ | ||
# https://api.github.com/repos/${{ github.repository }}/issues/$ISSUE \ | ||
# -d '{"state":"closed"}' | ||
# done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
name: Close Stale PRs | ||
# name: Close Stale PRs | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' # Runs daily at midnight | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
# on: | ||
# schedule: | ||
# - cron: '0 0 * * *' # Runs daily at midnight | ||
# pull_request: | ||
# types: | ||
# - opened | ||
# - reopened | ||
# - synchronize | ||
|
||
permissions: | ||
pull-requests: write | ||
issues: write | ||
# permissions: | ||
# pull-requests: write | ||
# issues: write | ||
|
||
jobs: | ||
close_stale_prs: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
# jobs: | ||
# close_stale_prs: | ||
# runs-on: ubuntu-latest | ||
# permissions: | ||
# pull-requests: write | ||
|
||
steps: | ||
- uses: actions/stale@v7 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
stale-pr-message: 'This PR has been automatically closed due to inactivity from the owner for 15 days.' | ||
days-before-pr-stale: 15 | ||
days-before-pr-close: 0 | ||
exempt-pr-author: false | ||
exempt-pr-labels: '' | ||
only-labels: '' | ||
operations-per-run: 30 | ||
remove-stale-when-updated: true | ||
debug-only: false | ||
# steps: | ||
# - uses: actions/stale@v7 | ||
# with: | ||
# repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
# stale-pr-message: 'This PR has been automatically closed due to inactivity from the owner for 15 days.' | ||
# days-before-pr-stale: 15 | ||
# days-before-pr-close: 0 | ||
# exempt-pr-author: false | ||
# exempt-pr-labels: '' | ||
# only-labels: '' | ||
# operations-per-run: 30 | ||
# remove-stale-when-updated: true | ||
# debug-only: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
name: Close Issues on PR Merge | ||
# name: Close Issues on PR Merge | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
# on: | ||
# pull_request: | ||
# types: [closed] | ||
|
||
jobs: | ||
close-issues: | ||
runs-on: ubuntu-latest | ||
# # jobs: | ||
# close-issues: | ||
# runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
# steps: | ||
# - name: Checkout repository | ||
# uses: actions/checkout@v2 | ||
|
||
- name: Close linked issues | ||
if: github.event.pull_request.merged == true | ||
run: | | ||
ISSUES=$(jq -r '.pull_request.body' "$GITHUB_EVENT_PATH" | grep -Eo '#[0-9]+' | tr -d '#') | ||
for ISSUE in $ISSUES | ||
do | ||
echo "Closing issue #$ISSUE" | ||
curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
https://api.github.com/repos/${{ github.repository }}/issues/$ISSUE/comments \ | ||
-d '{"body":"Closed by PR #${{ github.event.pull_request.number }}"}' | ||
curl -X PATCH -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
https://api.github.com/repos/${{ github.repository }}/issues/$ISSUE \ | ||
-d '{"state":"closed"}' | ||
done | ||
# - name: Close linked issues | ||
# if: github.event.pull_request.merged == true | ||
# run: | | ||
# ISSUES=$(jq -r '.pull_request.body' "$GITHUB_EVENT_PATH" | grep -Eo '#[0-9]+' | tr -d '#') | ||
# for ISSUE in $ISSUES | ||
# do | ||
# echo "Closing issue #$ISSUE" | ||
# curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
# -H "Accept: application/vnd.github.v3+json" \ | ||
# https://api.github.com/repos/${{ github.repository }}/issues/$ISSUE/comments \ | ||
# -d '{"body":"Closed by PR #${{ github.event.pull_request.number }}"}' | ||
# curl -X PATCH -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
# -H "Accept: application/vnd.github.v3+json" \ | ||
# https://api.github.com/repos/${{ github.repository }}/issues/$ISSUE \ | ||
# -d '{"state":"closed"}' | ||
# done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
name: Greetings | ||
# name: Greetings | ||
|
||
on: [pull_request_target, issues] | ||
# on: [pull_request_target, issues] | ||
|
||
jobs: | ||
greeting: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/first-interaction@v1 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
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." | ||
pr-message: "Welcome to Our repository.🎊 Thank you so much for taking the time to point this out." | ||
# jobs: | ||
# greeting: | ||
# runs-on: ubuntu-latest | ||
# permissions: | ||
# issues: write | ||
# pull-requests: write | ||
# steps: | ||
# - uses: actions/first-interaction@v1 | ||
# with: | ||
# repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
# 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." | ||
# pr-message: "Welcome to Our repository.🎊 Thank you so much for taking the time to point this out." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
name: 'Greetings' | ||
# name: 'Greetings' | ||
|
||
on: | ||
fork: | ||
push: | ||
branches: [main] | ||
issues: | ||
types: [opened] | ||
pull_request_target: | ||
types: [opened] | ||
# on: | ||
# fork: | ||
# push: | ||
# branches: [main] | ||
# issues: | ||
# types: [opened] | ||
# pull_request_target: | ||
# types: [opened] | ||
|
||
jobs: | ||
welcome: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: EddieHubCommunity/gh-action-community/src/welcome@main | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
issue-message: | | ||
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! | ||
pr-message: | | ||
Great job, @${{ github.actor }}! 🎉 Thank you for submitting your pull request. Your contribution is valuable and we appreciate your efforts to improve our project. | ||
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)' | ||
# jobs: | ||
# welcome: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v1 | ||
# - uses: EddieHubCommunity/gh-action-community/src/welcome@main | ||
# with: | ||
# github-token: ${{ secrets.GITHUB_TOKEN }} | ||
# issue-message: | | ||
# 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! | ||
# pr-message: | | ||
# Great job, @${{ github.actor }}! 🎉 Thank you for submitting your pull request. Your contribution is valuable and we appreciate your efforts to improve our project. | ||
# 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)' |
Oops, something went wrong.