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._ 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. 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 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/*'] 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 diff --git a/.github/workflows/restrict-main.yml b/.github/workflows/restrict-main.yml new file mode 100644 index 0000000..5dd8e6b --- /dev/null +++ b/.github/workflows/restrict-main.yml @@ -0,0 +1,16 @@ +name: "Enforce Release or Hotfix Branch Merge" + +on: + pull_request: + branches: + - main + +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 main." + exit 1 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