Skip to content

Commit 48d1ead

Browse files
Fix first interaction,added CODEOWNERS,add unauthorized PR checks (PalisadoesFoundation#408)
* Create CODEOWNERS * Create pull-request-target.yml * Update pull-request.yml * Create authorized-changes-detection.yml * Update CODEOWNERS * Update authorized-changes-detection.yml * Update pull-request.yml
1 parent 72c0cf7 commit 48d1ead

File tree

4 files changed

+40
-13
lines changed

4 files changed

+40
-13
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Checking workflow files
2+
on:
3+
pull_request:
4+
paths:
5+
- '.github/**'
6+
7+
jobs:
8+
Checking-for-unauthorized-file-changes:
9+
name: Checking for unauthorized file changes
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Unauthorized file modification in PR
13+
run: exit 1
14+
15+
16+
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: PR target workflow
2+
on:
3+
pull_request_target:
4+
5+
jobs:
6+
PR-Greeting:
7+
name: Greeting Message to user
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/first-interaction@v1
12+
with:
13+
repo-token: ${{ secrets.GITHUB_TOKEN }}
14+
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."
15+
16+
17+

.github/workflows/pull-request.yml

+4-13
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,9 @@ on:
33
pull_request:
44

55
jobs:
6-
PR-Greeting:
7-
name: Greeting Message to user
8-
runs-on: ubuntu-latest
9-
steps:
10-
- uses: actions/first-interaction@v1
11-
with:
12-
repo-token: ${{ secrets.GITHUB_TOKEN }}
13-
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."
14-
156
Linter:
167
name: Lints the code
178
runs-on: ubuntu-latest
18-
needs: PR-Greeting
199
steps:
2010
- uses: actions/checkout@v2
2111
- name: Install Dependencies
@@ -25,17 +15,17 @@ jobs:
2515

2616
Count-lines-of-code:
2717
name: Total number of lines in every file should not be more than 400
28-
needs: PR-Greeting
2918
runs-on: ubuntu-latest
19+
needs: Linter
3020
steps:
3121
- uses: actions/checkout@v2
3222
- run: chmod +x ./.github/workflows/countline.py
3323
- run: ./.github/workflows/countline.py
3424

3525
Code-Formatter:
3626
name: Formats the code
37-
needs: PR-Greeting
3827
runs-on: ubuntu-latest
28+
needs: Linter
3929
steps:
4030
- name: Checkout
4131
uses: actions/checkout@v2
@@ -52,6 +42,7 @@ jobs:
5242
CodeQL:
5343
name: "CodeQL"
5444
runs-on: ubuntu-latest
45+
needs: Code-Formatter
5546
permissions:
5647
actions: read
5748
contents: read
@@ -79,7 +70,7 @@ jobs:
7970
Code-Coverage:
8071
name: Shows code coverage
8172
runs-on: ubuntu-latest
82-
needs: PR-Greeting
73+
needs: CodeQL
8374
steps:
8475
- uses: actions/checkout@v2
8576
- uses: actions/setup-node@v2

CODEOWNERS

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/.github/ @palisadoes
2+
CODEOWNERS @palisadoes
3+

0 commit comments

Comments
 (0)