From bcc5f7faf2946e14d83faacfda37dd8f3ceb618d Mon Sep 17 00:00:00 2001 From: Martina Cantaro Date: Fri, 19 Apr 2024 15:42:05 -0300 Subject: [PATCH 1/7] first steps --- .github/workflows/daily_pr_summary.yml | 25 +++++++++++++++++++++++++ daily_pr_summary.py | 1 + daily_pr_summary.yml | 25 +++++++++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 .github/workflows/daily_pr_summary.yml create mode 100644 daily_pr_summary.py create mode 100644 daily_pr_summary.yml diff --git a/.github/workflows/daily_pr_summary.yml b/.github/workflows/daily_pr_summary.yml new file mode 100644 index 000000000..889c9cd91 --- /dev/null +++ b/.github/workflows/daily_pr_summary.yml @@ -0,0 +1,25 @@ +name: Daily PR Summary + +on: + schedule: + - cron: '0 8 * * *' # Runs every day at 8:00 AM UTC. Adjust as needed. + +jobs: + generate-summary: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.12' # Choose a suitable Python version + + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + # pip install -r requirements.txt # If you have any Python dependencies + + - name: Run Script + run: python daily_pr_summary.py diff --git a/daily_pr_summary.py b/daily_pr_summary.py new file mode 100644 index 000000000..638eff256 --- /dev/null +++ b/daily_pr_summary.py @@ -0,0 +1 @@ +print("hello world!") \ No newline at end of file diff --git a/daily_pr_summary.yml b/daily_pr_summary.yml new file mode 100644 index 000000000..889c9cd91 --- /dev/null +++ b/daily_pr_summary.yml @@ -0,0 +1,25 @@ +name: Daily PR Summary + +on: + schedule: + - cron: '0 8 * * *' # Runs every day at 8:00 AM UTC. Adjust as needed. + +jobs: + generate-summary: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.12' # Choose a suitable Python version + + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + # pip install -r requirements.txt # If you have any Python dependencies + + - name: Run Script + run: python daily_pr_summary.py From 313ac0ce16d9a0345dd66cdc351dfa7f6bee48b2 Mon Sep 17 00:00:00 2001 From: Martina Cantaro Date: Wed, 8 May 2024 15:59:01 -0300 Subject: [PATCH 2/7] move ot new folder, change the yml contents --- workflows/daily_pr_summary.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 workflows/daily_pr_summary.yml diff --git a/workflows/daily_pr_summary.yml b/workflows/daily_pr_summary.yml new file mode 100644 index 000000000..5ce0126eb --- /dev/null +++ b/workflows/daily_pr_summary.yml @@ -0,0 +1,16 @@ +name: PR Reporter + +on: + schedule: + # Run this every day at 9am and 1pm + - cron: '0 9,18 * * *' + +jobs: + pr-reporter-slack: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: SeanReece/pr-reporter-slack@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + slack-webhook: ${{ secrets.SLACK_WEBHOOK }} \ No newline at end of file From 648a835461b03ee911bf98c6565da1fe5eabf66d Mon Sep 17 00:00:00 2001 From: Martina Cantaro <6120897+martinacantaro@users.noreply.github.com> Date: Wed, 8 May 2024 16:10:03 -0300 Subject: [PATCH 3/7] Create main.yml --- .github/workflows/main.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..c1333aef8 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,16 @@ +name: PR Reporter + +on: + schedule: + # Run this every day at 9am and 1pm + - cron: '0 9,18 * * *' + +jobs: + pr-reporter-slack: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: SeanReece/pr-reporter-slack@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + slack-webhook: ${{ secrets.SLACK_WEBHOOK }} From 9919bd526b6cf4145d62086add9f56a637176e5a Mon Sep 17 00:00:00 2001 From: Martina Cantaro Date: Wed, 8 May 2024 16:13:44 -0300 Subject: [PATCH 4/7] move workflows to .github --- .../workflows/workflows}/daily_pr_summary.yml | 0 daily_pr_summary.py | 1 - daily_pr_summary.yml | 25 ------------------- 3 files changed, 26 deletions(-) rename {workflows => .github/workflows/workflows}/daily_pr_summary.yml (100%) delete mode 100644 daily_pr_summary.py delete mode 100644 daily_pr_summary.yml diff --git a/workflows/daily_pr_summary.yml b/.github/workflows/workflows/daily_pr_summary.yml similarity index 100% rename from workflows/daily_pr_summary.yml rename to .github/workflows/workflows/daily_pr_summary.yml diff --git a/daily_pr_summary.py b/daily_pr_summary.py deleted file mode 100644 index 638eff256..000000000 --- a/daily_pr_summary.py +++ /dev/null @@ -1 +0,0 @@ -print("hello world!") \ No newline at end of file diff --git a/daily_pr_summary.yml b/daily_pr_summary.yml deleted file mode 100644 index 889c9cd91..000000000 --- a/daily_pr_summary.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Daily PR Summary - -on: - schedule: - - cron: '0 8 * * *' # Runs every day at 8:00 AM UTC. Adjust as needed. - -jobs: - generate-summary: - runs-on: ubuntu-latest - steps: - - name: Checkout Repository - uses: actions/checkout@v2 - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.12' # Choose a suitable Python version - - - name: Install Dependencies - run: | - python -m pip install --upgrade pip - # pip install -r requirements.txt # If you have any Python dependencies - - - name: Run Script - run: python daily_pr_summary.py From 37595379b93d875f8bf2be9d91e17a659885e363 Mon Sep 17 00:00:00 2001 From: Martina Cantaro Date: Wed, 8 May 2024 16:16:33 -0300 Subject: [PATCH 5/7] rearranged stuff, fixed minor details about yml --- .github/workflows/daily_pr_summary.yml | 25 ++++++------------- .../workflows/workflows/daily_pr_summary.yml | 16 ------------ 2 files changed, 8 insertions(+), 33 deletions(-) delete mode 100644 .github/workflows/workflows/daily_pr_summary.yml diff --git a/.github/workflows/daily_pr_summary.yml b/.github/workflows/daily_pr_summary.yml index 889c9cd91..570273aa7 100644 --- a/.github/workflows/daily_pr_summary.yml +++ b/.github/workflows/daily_pr_summary.yml @@ -2,24 +2,15 @@ name: Daily PR Summary on: schedule: - - cron: '0 8 * * *' # Runs every day at 8:00 AM UTC. Adjust as needed. + # Run this every day at 9am and 6pm + - cron: '0 9,18 * * *' jobs: - generate-summary: + pr-reporter-slack: runs-on: ubuntu-latest steps: - - name: Checkout Repository - uses: actions/checkout@v2 - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.12' # Choose a suitable Python version - - - name: Install Dependencies - run: | - python -m pip install --upgrade pip - # pip install -r requirements.txt # If you have any Python dependencies - - - name: Run Script - run: python daily_pr_summary.py + - uses: actions/checkout@v2 + - uses: SeanReece/pr-reporter-slack@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + slack-webhook: ${{ secrets.SLACK_WEBHOOK }} \ No newline at end of file diff --git a/.github/workflows/workflows/daily_pr_summary.yml b/.github/workflows/workflows/daily_pr_summary.yml deleted file mode 100644 index 5ce0126eb..000000000 --- a/.github/workflows/workflows/daily_pr_summary.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: PR Reporter - -on: - schedule: - # Run this every day at 9am and 1pm - - cron: '0 9,18 * * *' - -jobs: - pr-reporter-slack: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: SeanReece/pr-reporter-slack@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - slack-webhook: ${{ secrets.SLACK_WEBHOOK }} \ No newline at end of file From 66b0d73d6b1c5f12ff04562e1102cbb8694e982c Mon Sep 17 00:00:00 2001 From: Martina Cantaro Date: Wed, 8 May 2024 17:22:50 -0300 Subject: [PATCH 6/7] change trigger for action --- .github/workflows/daily_pr_summary.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/daily_pr_summary.yml b/.github/workflows/daily_pr_summary.yml index 570273aa7..c011a17e1 100644 --- a/.github/workflows/daily_pr_summary.yml +++ b/.github/workflows/daily_pr_summary.yml @@ -4,6 +4,16 @@ on: schedule: # Run this every day at 9am and 6pm - cron: '0 9,18 * * *' + push: + branches: + - "pr-summary-automation" + pull_request: + branches: + - "main" + paths: + - ".github/workflows/test.yaml" + + jobs: pr-reporter-slack: From ba99e595fafef329aab08df70961c34c8866c5f7 Mon Sep 17 00:00:00 2001 From: Martina Cantaro Date: Wed, 8 May 2024 17:26:14 -0300 Subject: [PATCH 7/7] remove v1 --- .github/workflows/daily_pr_summary.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/daily_pr_summary.yml b/.github/workflows/daily_pr_summary.yml index c011a17e1..204d88c53 100644 --- a/.github/workflows/daily_pr_summary.yml +++ b/.github/workflows/daily_pr_summary.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: SeanReece/pr-reporter-slack@v1 + - uses: SeanReece/pr-reporter-slack with: repo-token: ${{ secrets.GITHUB_TOKEN }} slack-webhook: ${{ secrets.SLACK_WEBHOOK }} \ No newline at end of file