From 7f4d9ba82b73a04481a4ee52bf150f9cc68a2c07 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Sat, 20 Jan 2024 18:16:18 +0100 Subject: Add copilot github action --- .github/workflows/copilot.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/copilot.yml (limited to '.github/workflows/copilot.yml') diff --git a/.github/workflows/copilot.yml b/.github/workflows/copilot.yml new file mode 100644 index 00000000..38c24378 --- /dev/null +++ b/.github/workflows/copilot.yml @@ -0,0 +1,33 @@ +name: AI Code Reviewer + +on: + pull_request: + types: + - opened + - synchronize + +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +permissions: + contents: read + pull-requests: write + +jobs: + review: + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: "3.x" + cache: 'pip' + - name: Install Requirements + run: pip install -r requirements.txt + - name: Install PyGithub + run: pip install PyGithub + - name: AI Code Review + run: python -m etc.tool.copilot \ No newline at end of file -- cgit v1.2.3 From 12866514486dc2a3566bdfc9f26b751c78c88e1d Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Sat, 20 Jan 2024 18:55:11 +0100 Subject: On new pull requests --- .github/workflows/copilot.yml | 1 - 1 file changed, 1 deletion(-) (limited to '.github/workflows/copilot.yml') diff --git a/.github/workflows/copilot.yml b/.github/workflows/copilot.yml index 38c24378..f7083c0c 100644 --- a/.github/workflows/copilot.yml +++ b/.github/workflows/copilot.yml @@ -4,7 +4,6 @@ on: pull_request: types: - opened - - synchronize env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -- cgit v1.2.3 From 9cf2ee0279e1f348a082a7ded7c163ed12a6359a Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Sat, 20 Jan 2024 19:10:08 +0100 Subject: Fix permissions --- .github/workflows/copilot.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to '.github/workflows/copilot.yml') diff --git a/.github/workflows/copilot.yml b/.github/workflows/copilot.yml index f7083c0c..c34dcb11 100644 --- a/.github/workflows/copilot.yml +++ b/.github/workflows/copilot.yml @@ -4,13 +4,12 @@ on: pull_request: types: - opened + - synchronize env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -permissions: - contents: read - pull-requests: write +permissions: write-all jobs: review: -- cgit v1.2.3