From 2da50fe98c7e48a260c3f87156473344cb423849 Mon Sep 17 00:00:00 2001 From: Mark Sagi-Kazar Date: Wed, 8 Oct 2025 03:01:44 +0200 Subject: [PATCH] chore: add slash commands Signed-off-by: Mark Sagi-Kazar --- .github/octoslash/policies/collaborator.cedar | 5 +++++ .github/octoslash/policies/triager.cedar | 5 +++++ .github/octoslash/principals.json | 12 ++++++++++++ .github/workflows/octoslash.yaml | 18 ++++++++++++++++++ 4 files changed, 40 insertions(+) create mode 100644 .github/octoslash/policies/collaborator.cedar create mode 100644 .github/octoslash/policies/triager.cedar create mode 100644 .github/octoslash/principals.json create mode 100644 .github/workflows/octoslash.yaml diff --git a/.github/octoslash/policies/collaborator.cedar b/.github/octoslash/policies/collaborator.cedar new file mode 100644 index 0000000..8b6003e --- /dev/null +++ b/.github/octoslash/policies/collaborator.cedar @@ -0,0 +1,5 @@ +permit( + principal in Role::"Collaborator", + action, + resource +); diff --git a/.github/octoslash/policies/triager.cedar b/.github/octoslash/policies/triager.cedar new file mode 100644 index 0000000..dd969dc --- /dev/null +++ b/.github/octoslash/policies/triager.cedar @@ -0,0 +1,5 @@ +permit( + principal in Role::"Triager", + action in [Action::"close", Action::"label", Action::"remove-label"], + resource is Issue +); diff --git a/.github/octoslash/principals.json b/.github/octoslash/principals.json new file mode 100644 index 0000000..bfee9c2 --- /dev/null +++ b/.github/octoslash/principals.json @@ -0,0 +1,12 @@ +[ + { + "uid": { "type": "User", "id": "1226384" }, + "attrs": { "login": "sagikazarmark" }, + "parents": [{ "type": "Role", "id": "Collaborator" }] + }, + { + "uid": { "type": "User", "id": "805695" }, + "attrs": { "login": "spacez320" }, + "parents": [{ "type": "Role", "id": "Triager" }] + } +] diff --git a/.github/workflows/octoslash.yaml b/.github/workflows/octoslash.yaml new file mode 100644 index 0000000..5fd4ef8 --- /dev/null +++ b/.github/workflows/octoslash.yaml @@ -0,0 +1,18 @@ +name: Octoslash + +on: issue_comment + +permissions: + issues: write + # pull-requests: write + +jobs: + run: + name: Run + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Octoslash + uses: sagikazarmark/octoslash-action@v0