From 2c45be6ed9ecd8919c0821d8f12973e33b4b6004 Mon Sep 17 00:00:00 2001 From: NISHNATA DEBNATH <53905682+nishnatadebnath@users.noreply.github.com> Date: Fri, 24 Dec 2021 18:59:38 +0530 Subject: [PATCH] Adding CODEOWNERS, fixing first interaction for contributers and adding unathorized code check in PR (#196) * Update pull-requests.yml * Create pull-request-target.yml * Create authorized-changes-detection.yml * Create CODEOWNERS --- .../workflows/authorized-changes-detection.yml | 13 +++++++++++++ .github/workflows/pull-request-target.yml | 16 ++++++++++++++++ .github/workflows/pull-requests.yml | 11 +---------- CODEOWNERS | 2 ++ 4 files changed, 32 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/authorized-changes-detection.yml create mode 100644 .github/workflows/pull-request-target.yml create mode 100644 CODEOWNERS diff --git a/.github/workflows/authorized-changes-detection.yml b/.github/workflows/authorized-changes-detection.yml new file mode 100644 index 0000000000..906310be46 --- /dev/null +++ b/.github/workflows/authorized-changes-detection.yml @@ -0,0 +1,13 @@ +name: Checking workflow files +on: + pull_request: + paths: + - '.github/**' + +jobs: + Checking-for-unauthorized-file-changes: + name: Checking for unauthorized file changes + runs-on: ubuntu-latest + steps: + - name: Unauthorized file modification in PR + run: exit 1 diff --git a/.github/workflows/pull-request-target.yml b/.github/workflows/pull-request-target.yml new file mode 100644 index 0000000000..b06d9bab00 --- /dev/null +++ b/.github/workflows/pull-request-target.yml @@ -0,0 +1,16 @@ +name: PR target workflow +on: + pull_request_target: + +jobs: + PR-Greeting: + name: Greeting Message to user + runs-on: ubuntu-latest + + steps: + - uses: actions/first-interaction@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + pr-message: "Congratulations on making your first PR! :confetti_ball: If you haven't already, check out our [Contributing Guidelines](https://github.com/PalisadoesFoundation/talawa/blob/master/CONTRIBUTING.md) and [PR Reporting Guidelines](https://github.com/PalisadoesFoundation/talawa/blob/master/PR-guidelines.md) to ensure that you are following our guidelines for contributing and creating PR." + + diff --git a/.github/workflows/pull-requests.yml b/.github/workflows/pull-requests.yml index 3eeb848e0a..3ea54f3170 100644 --- a/.github/workflows/pull-requests.yml +++ b/.github/workflows/pull-requests.yml @@ -4,19 +4,10 @@ on: branches: - '**' jobs: - PR-Greeting: - name: Greeting Message to user - runs-on: ubuntu-latest - steps: - - uses: actions/first-interaction@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - pr-message: "Congratulations on making your first PR! :confetti_ball: If you haven't already, check out our [Contributing Guidelines](https://github.com/PalisadoesFoundation/talawa/blob/master/CONTRIBUTING.md) and [PR Reporting Guidelines](https://github.com/PalisadoesFoundation/talawa/blob/master/PR-guidelines.md) to ensure that you are following our guidelines for contributing and creating PR." - + Linter: name: Lints the code runs-on: ubuntu-latest - needs: PR-Greeting steps: - uses: actions/checkout@v2 - name: Install Dependencies diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000000..57dc9c6c80 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,2 @@ +/.github/ @palisadoes +CODEOWNERS @palisadoes