From 1df774d0da30319765d9968b0f73375fb867e256 Mon Sep 17 00:00:00 2001 From: Karan <123349027+karan1633@users.noreply.github.com> Date: Tue, 19 Sep 2023 15:56:04 +0530 Subject: [PATCH 1/4] greetings yml added --- .github/workflows/greetings.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/greetings.yml diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml new file mode 100644 index 0000000..2a518c6 --- /dev/null +++ b/.github/workflows/greetings.yml @@ -0,0 +1,16 @@ +name: Greetings + +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: "Thank you for opening an issue in our repository! 🎉 Please make sure to provide detailed information about the issue you're facing, including any error messages or steps to reproduce. This will help us understand and address the problem more effectively. If you have any questions or need assistance, don't hesitate to ask. We're here to help!" + pr-message: "Thank you for raising a new pull request! 🚀 Before submitting your pull request, please ensure that you have thoroughly tested your changes and followed our contribution guidelines. This includes providing a clear description of your changes and any related issues or feature requests. If you have any questions or need guidance, feel free to reach out to us. We appreciate your contributions!" From e581c27eb715483ec309cde22506a475d1fc8a7a Mon Sep 17 00:00:00 2001 From: Karan <123349027+karan1633@users.noreply.github.com> Date: Tue, 19 Sep 2023 16:36:57 +0530 Subject: [PATCH 2/4] yml file for pull request validation --- .github/workflows/pr-merge-check.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/pr-merge-check.yml diff --git a/.github/workflows/pr-merge-check.yml b/.github/workflows/pr-merge-check.yml new file mode 100644 index 0000000..bc99a9e --- /dev/null +++ b/.github/workflows/pr-merge-check.yml @@ -0,0 +1,26 @@ +name: PR Merge Check + +on: + pull_request: + types: [opened, synchronize] + +jobs: + pr-merge-check: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Check if PR is merged with main branch + run: | + BASE_BRANCH=main + PR_BRANCH=$GITHUB_REF + + # Check if the PR branch contains commits from the main branch + if ! git merge-base --is-ancestor $BASE_BRANCH $PR_BRANCH; then + echo "Error: Please make sure to fetch and merge the latest changes from $BASE_BRANCH before creating a PR." + exit 1 + fi + env: + BASE_BRANCH: ${{ secrets.BASE_BRANCH }} From 157e5296e77e25cf93fef94b90bdd371ac63fdff Mon Sep 17 00:00:00 2001 From: Karan <123349027+karan1633@users.noreply.github.com> Date: Tue, 19 Sep 2023 17:51:54 +0530 Subject: [PATCH 3/4] Update pr-merge-check.yml --- .github/workflows/pr-merge-check.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-merge-check.yml b/.github/workflows/pr-merge-check.yml index bc99a9e..c54488a 100644 --- a/.github/workflows/pr-merge-check.yml +++ b/.github/workflows/pr-merge-check.yml @@ -2,7 +2,8 @@ name: PR Merge Check on: pull_request: - types: [opened, synchronize] + types: [opened,synchronize] + branches: [main, develop] jobs: pr-merge-check: From 9e434f0c78f5d4c88a4aebbf5225b247a5f00d1d Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 29 Sep 2023 11:09:42 +0530 Subject: [PATCH 4/4] work flow deleted:SK --- .github/workflows/greetings.yml | 16 ---------------- .github/workflows/pr-merge-check.yml | 27 --------------------------- 2 files changed, 43 deletions(-) delete mode 100644 .github/workflows/greetings.yml delete mode 100644 .github/workflows/pr-merge-check.yml diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml deleted file mode 100644 index 2a518c6..0000000 --- a/.github/workflows/greetings.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Greetings - -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: "Thank you for opening an issue in our repository! 🎉 Please make sure to provide detailed information about the issue you're facing, including any error messages or steps to reproduce. This will help us understand and address the problem more effectively. If you have any questions or need assistance, don't hesitate to ask. We're here to help!" - pr-message: "Thank you for raising a new pull request! 🚀 Before submitting your pull request, please ensure that you have thoroughly tested your changes and followed our contribution guidelines. This includes providing a clear description of your changes and any related issues or feature requests. If you have any questions or need guidance, feel free to reach out to us. We appreciate your contributions!" diff --git a/.github/workflows/pr-merge-check.yml b/.github/workflows/pr-merge-check.yml deleted file mode 100644 index c54488a..0000000 --- a/.github/workflows/pr-merge-check.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: PR Merge Check - -on: - pull_request: - types: [opened,synchronize] - branches: [main, develop] - -jobs: - pr-merge-check: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Check if PR is merged with main branch - run: | - BASE_BRANCH=main - PR_BRANCH=$GITHUB_REF - - # Check if the PR branch contains commits from the main branch - if ! git merge-base --is-ancestor $BASE_BRANCH $PR_BRANCH; then - echo "Error: Please make sure to fetch and merge the latest changes from $BASE_BRANCH before creating a PR." - exit 1 - fi - env: - BASE_BRANCH: ${{ secrets.BASE_BRANCH }}