diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..a0a71a3c --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,27 @@ +# Default code owners for entire repository +* @hashgraph/hedera-docs + +######################### +##### Core Files ###### +######################### + +# NOTE: Must be placed last to ensure enforcement over all other rules + +# Protection Rules for Github Configuration Files and Actions Workflows +/.github/ @hashgraph/platform-ci @hashgraph/platform-ci-committers @hashgraph/release-engineering-managers @hashgraph/hedera-docs +/.github/workflows/ @hashgraph/platform-ci @hashgraph/platform-ci-committers @hashgraph/release-engineering-managers +/.github/CODEOWNERS @hashgraph/platform-ci @hashgraph/platform-ci-committers @hashgraph/release-engineering-managers + +# Self-protection for root CODEOWNERS files (this file should not exist and should definitely require approval) +/CODEOWNERS @hashgraph/release-engineering-managers + +# Protect the repository root files +/README.md @hashgraph/platform-ci @hashgraph/release-engineering-managers @hashgraph/hedera-docs +**/LICENSE @hashgraph/release-engineering-managers + +# CodeCov configuration +**/codecov.yml @hashgraph/platform-ci @hashgraph/release-engineering-managers @hashgraph/hedera-docs + +# Git Ignore definitions +**/.gitignore @hashgraph/platform-ci @hashgraph/release-engineering-managers @hashgraph/hedera-docs +**/.gitignore.* @hashgraph/platform-ci @hashgraph/release-engineering-managers @hashgraph/hedera-docs \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..5ace4600 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/pr-formatting.yml b/.github/workflows/pr-formatting.yml new file mode 100644 index 00000000..78b400d2 --- /dev/null +++ b/.github/workflows/pr-formatting.yml @@ -0,0 +1,55 @@ +name: "PR Formatting" +on: + pull_request_target: + types: + - assigned + - unassigned + - labeled + - unlabeled + - opened + - reopened + - edited + - converted_to_draft + - ready_for_review + - review_requested + - review_request_removed + - locked + - unlocked + - synchronize + +defaults: + run: + shell: bash + +permissions: + statuses: write + +jobs: + title-check: + name: Title Check + runs-on: hashgraph-docs-linux-medium + steps: + - name: Harden Runner + uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2 + with: + egress-policy: audit + + - name: Check PR Title + uses: step-security/action-semantic-pull-request@bc0cf74f5be4ce34accdec1ae908dff38dc5def1 # v6.1.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + assignee-check: + name: Assignee Check + runs-on: hashgraph-docs-linux-medium + steps: + - name: Harden Runner + uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2 + with: + egress-policy: audit + + - name: Check Assignee + if: ${{ github.event.pull_request.assignees == null || github.event.pull_request.assignees[0] == null }} + run: | + echo "Assignee is not set. Failing the workflow." + exit 1 \ No newline at end of file