From 8a0128caf7710fe783e9406ca5cffca18aa5a9f3 Mon Sep 17 00:00:00 2001 From: Srikar Reddy Date: Mon, 16 Sep 2024 23:51:16 +0530 Subject: [PATCH 1/8] Create labeler.yml --- .github/labeler.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .github/labeler.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..47b03ab --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,7 @@ +documentation: + - changed-files: + - any-glob-to-any-file: ['.github/*', '**/*.md'] + +enhancement: + - changed-files: + - any-glob-to-any-file: ['FinBoxRiskManager/*', 'RiskManager/*', 'RiskManagerTests/*'] From dec51067016f39a04e33f1217c0da6939ada57d7 Mon Sep 17 00:00:00 2001 From: Srikar Reddy Date: Mon, 16 Sep 2024 23:54:57 +0530 Subject: [PATCH 2/8] Create Workflow labeler.yml --- .github/workflows/labeler.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/labeler.yml diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000..804eb2e --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,16 @@ +name: "Pull Request Labeler" +on: + pull_request_target: + types: + - opened # Add labels when PR is created + - synchronize # Add labels when PR receives new commits, which may modify the files in the PR + - reopened # Add labels when PR is opened from closed state + +jobs: + labeler: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5 From 355ed03bb557bdeab4b830d46901cfa0d39b0e6f Mon Sep 17 00:00:00 2001 From: Srikar Reddy Date: Mon, 16 Sep 2024 23:57:04 +0530 Subject: [PATCH 3/8] Update FEATURE_REQUEST.md --- .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md index f12d53e..094dd19 100644 --- a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md +++ b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md @@ -6,6 +6,7 @@ labels: 'enhancement' --- + ## 🚀 Feature Request _A clear and concise description of the feature or improvement you are suggesting._ From 9fa0d47f509de35f5d78eea80063ee48c33335db Mon Sep 17 00:00:00 2001 From: Srikar Reddy Date: Mon, 16 Sep 2024 23:57:34 +0530 Subject: [PATCH 4/8] Remove contact_links --- .github/ISSUE_TEMPLATE/config.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 18f7257..3ba13e0 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,6 +1 @@ blank_issues_enabled: false - -contact_links: - - name: Report Security Vulnerability - url: mailto:srikar@finbox.in - about: Please report security vulnerabilities here. From 241b009eb18140b16c44c65455247b40b3b99faf Mon Sep 17 00:00:00 2001 From: Srikar Reddy Date: Mon, 16 Sep 2024 23:58:39 +0530 Subject: [PATCH 5/8] Remove PR Labels from Contributor Checklist --- .github/PULL_REQUEST_TEMPLATE.md | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index ff17d27..e40268a 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -41,7 +41,6 @@ Share the testing strategy used to ensure the changes work as expected. - [ ] Tests for the changes have been added - [ ] CHANGELOG Updated - [ ] Version number updated -- [ ] Added PR Labels - [ ] Build is successful - [ ] Changes do not negatively impact performance - [ ] New code follows Google Java/Kotlin Style guidelines From 38865a35b09c3554baec1f4f9af1f25da93fdd7e Mon Sep 17 00:00:00 2001 From: Srikar Reddy Date: Tue, 17 Sep 2024 00:01:23 +0530 Subject: [PATCH 6/8] Create restrict-master.yml --- .github/workflows/restrict-master.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/restrict-master.yml diff --git a/.github/workflows/restrict-master.yml b/.github/workflows/restrict-master.yml new file mode 100644 index 0000000..2f05371 --- /dev/null +++ b/.github/workflows/restrict-master.yml @@ -0,0 +1,16 @@ +name: "Enforce Release or Hotfix Branch Merge" + +on: + pull_request: + branches: + - master + +jobs: + check-branch: + runs-on: ubuntu-latest + steps: + - name: Check if PR is from the release or hotfix branch + if: github.head_ref != 'release' && github.head_ref != 'hotfix' + run: | + echo "Only the release or hotfix branch can be merged into master." + exit 1 From 514c77b29766ea501823ae09b8c17576ac24ce5c Mon Sep 17 00:00:00 2001 From: Srikar Reddy Date: Tue, 17 Sep 2024 00:03:49 +0530 Subject: [PATCH 7/8] Restrict Branch Merge for Release --- .github/workflows/restrict-release.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/restrict-release.yml diff --git a/.github/workflows/restrict-release.yml b/.github/workflows/restrict-release.yml new file mode 100644 index 0000000..2791089 --- /dev/null +++ b/.github/workflows/restrict-release.yml @@ -0,0 +1,16 @@ +name: "Enforce Release Branch Merge" + +on: + pull_request: + branches: + - release + +jobs: + check-branch: + runs-on: ubuntu-latest + steps: + - name: Check if PR is from the develop branch + if: github.head_ref != 'develop' + run: | + echo "Only the develop branch can be merged into release." + exit 1 From 6bc2a40640649f3248d84a6034a85bdc619b3a66 Mon Sep 17 00:00:00 2001 From: Srikar Reddy Date: Tue, 17 Sep 2024 00:07:02 +0530 Subject: [PATCH 8/8] Rename master branch name to main branch name --- .github/workflows/{restrict-master.yml => restrict-main.yml} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename .github/workflows/{restrict-master.yml => restrict-main.yml} (92%) diff --git a/.github/workflows/restrict-master.yml b/.github/workflows/restrict-main.yml similarity index 92% rename from .github/workflows/restrict-master.yml rename to .github/workflows/restrict-main.yml index 2f05371..5dd8e6b 100644 --- a/.github/workflows/restrict-master.yml +++ b/.github/workflows/restrict-main.yml @@ -3,7 +3,7 @@ name: "Enforce Release or Hotfix Branch Merge" on: pull_request: branches: - - master + - main jobs: check-branch: @@ -12,5 +12,5 @@ jobs: - name: Check if PR is from the release or hotfix branch if: github.head_ref != 'release' && github.head_ref != 'hotfix' run: | - echo "Only the release or hotfix branch can be merged into master." + echo "Only the release or hotfix branch can be merged into main." exit 1