From 5f2fa4d2ce6be73a628d860295bfc6409f462222 Mon Sep 17 00:00:00 2001 From: pwseg Date: Mon, 20 Oct 2025 10:05:00 -0500 Subject: [PATCH 01/10] init github action file --- .github/workflows/new-pages-report.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .github/workflows/new-pages-report.yml diff --git a/.github/workflows/new-pages-report.yml b/.github/workflows/new-pages-report.yml new file mode 100644 index 0000000000..e69de29bb2 From 9c1f46ed2350d18a717da469f947564b583aca72 Mon Sep 17 00:00:00 2001 From: pwseg Date: Mon, 20 Oct 2025 10:06:17 -0500 Subject: [PATCH 02/10] change to new files to catch all updates --- .github/workflows/new-files-report.yml | 57 ++++++++++++++++++++++++++ .github/workflows/new-pages-report.yml | 0 2 files changed, 57 insertions(+) create mode 100644 .github/workflows/new-files-report.yml delete mode 100644 .github/workflows/new-pages-report.yml diff --git a/.github/workflows/new-files-report.yml b/.github/workflows/new-files-report.yml new file mode 100644 index 0000000000..60664a3fbc --- /dev/null +++ b/.github/workflows/new-files-report.yml @@ -0,0 +1,57 @@ +# .github/workflows/new-pages-report.yml +name: New Files Report +on: + schedule: + - cron: '0 14 * * 1' # Every Monday at 2pm UTC + workflow_dispatch: # Manual trigger from Actions tab + +jobs: + report: + runs-on: ubuntu-latest + permissions: + issues: write + contents: read + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Generate report + id: report + run: | + echo "## New Files Since August 30, 2025" > report.md + echo "" >> report.md + + FILES=$(git log --since="2025-08-30" --diff-filter=A --name-only --pretty=format:"" -- src/ 2>/dev/null | grep -v '^$' | sort -u || echo "") + + if [ -z "$FILES" ]; then + echo "No new files found." >> report.md + else + echo "$FILES" | while read file; do + if [ -n "$file" ]; then + COMMIT=$(git log --diff-filter=A --format="%h" -- "$file" | head -1) + DATE=$(git log --diff-filter=A --format="%ad" --date=short -- "$file" | head -1) + MSG=$(git log --diff-filter=A --format="%s" -- "$file" | head -1) + echo "- **$DATE**: \`$file\` - $MSG ([${COMMIT}](../../commit/${COMMIT}))" >> report.md + fi + done + fi + + echo "" >> report.md + echo "_Report generated on $(date +'%Y-%m-%d %H:%M UTC')_" >> report.md + + - name: Create issue + uses: actions/github-script@v7 + with: + script: | + const fs = require('fs'); + const report = fs.readFileSync('report.md', 'utf8'); + const today = new Date().toISOString().split('T')[0]; + + github.rest.issues.create({ + owner: context.repo.owner, + repo: context.repo.repo, + title: `New Files Report - ${today}`, + body: report, + labels: ['documentation', 'migration'] + }); \ No newline at end of file diff --git a/.github/workflows/new-pages-report.yml b/.github/workflows/new-pages-report.yml deleted file mode 100644 index e69de29bb2..0000000000 From 5634bbaba13cd5ff4730242e8e62e9de0a25f232 Mon Sep 17 00:00:00 2001 From: pwseg Date: Mon, 20 Oct 2025 10:16:41 -0500 Subject: [PATCH 03/10] change to Friday at noon --- .github/workflows/new-pages-report.yml | 57 ++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/new-pages-report.yml diff --git a/.github/workflows/new-pages-report.yml b/.github/workflows/new-pages-report.yml new file mode 100644 index 0000000000..f5fbdc58b6 --- /dev/null +++ b/.github/workflows/new-pages-report.yml @@ -0,0 +1,57 @@ +# .github/workflows/new-pages-report.yml +name: New Files Report +on: + schedule: + - cron: '0 16 * * 5' # This will run automatically every Friday at noon Eastern + workflow_dispatch: # We can also trigger it manually from the Actions tab + +jobs: + report: + runs-on: ubuntu-latest + permissions: + issues: write + contents: read + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Generate report + id: report + run: | + echo "## New files added since August 30, 2025" > report.md + echo "" >> report.md + + FILES=$(git log --since="2025-08-30" --diff-filter=A --name-only --pretty=format:"" -- src/ 2>/dev/null | grep -v '^$' | sort -u || echo "") + + if [ -z "$FILES" ]; then + echo "No new files found." >> report.md + else + echo "$FILES" | while read file; do + if [ -n "$file" ]; then + COMMIT=$(git log --diff-filter=A --format="%h" -- "$file" | head -1) + DATE=$(git log --diff-filter=A --format="%ad" --date=short -- "$file" | head -1) + MSG=$(git log --diff-filter=A --format="%s" -- "$file" | head -1) + echo "- **$DATE**: \`$file\` - $MSG ([${COMMIT}](../../commit/${COMMIT}))" >> report.md + fi + done + fi + + echo "" >> report.md + echo "_Report generated on $(date +'%Y-%m-%d %H:%M UTC')_" >> report.md + + - name: Create issue + uses: actions/github-script@v7 + with: + script: | + const fs = require('fs'); + const report = fs.readFileSync('report.md', 'utf8'); + const today = new Date().toISOString().split('T')[0]; + + github.rest.issues.create({ + owner: context.repo.owner, + repo: context.repo.repo, + title: `New Files Report - ${today}`, + body: report, + labels: ['documentation', 'migration'] + }); \ No newline at end of file From 0bf01bf82556f9ec841e0588fb34741358b04187 Mon Sep 17 00:00:00 2001 From: pwseg Date: Mon, 20 Oct 2025 10:45:29 -0500 Subject: [PATCH 04/10] update to September 17th --- .github/workflows/new-pages-report.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/new-pages-report.yml b/.github/workflows/new-pages-report.yml index f5fbdc58b6..bf531da44e 100644 --- a/.github/workflows/new-pages-report.yml +++ b/.github/workflows/new-pages-report.yml @@ -19,10 +19,10 @@ jobs: - name: Generate report id: report run: | - echo "## New files added since August 30, 2025" > report.md + echo "## New files added since September 17, 2025" > report.md echo "" >> report.md - FILES=$(git log --since="2025-08-30" --diff-filter=A --name-only --pretty=format:"" -- src/ 2>/dev/null | grep -v '^$' | sort -u || echo "") + FILES=$(git log --since="2025-09-17" --diff-filter=A --name-only --pretty=format:"" -- src/ 2>/dev/null | grep -v '^$' | sort -u || echo "") if [ -z "$FILES" ]; then echo "No new files found." >> report.md From 2723c5f98e787956918d237f55e0baa2d12c0b45 Mon Sep 17 00:00:00 2001 From: pwseg Date: Mon, 20 Oct 2025 10:46:27 -0500 Subject: [PATCH 05/10] automatically assign to paul --- .github/workflows/new-pages-report.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/new-pages-report.yml b/.github/workflows/new-pages-report.yml index bf531da44e..781018e8e0 100644 --- a/.github/workflows/new-pages-report.yml +++ b/.github/workflows/new-pages-report.yml @@ -51,7 +51,8 @@ jobs: github.rest.issues.create({ owner: context.repo.owner, repo: context.repo.repo, - title: `New Files Report - ${today}`, + title: `New files report - ${today}`, body: report, - labels: ['documentation', 'migration'] + labels: ['migration'], + assignees: ['pwseg'] }); \ No newline at end of file From 54003d25c81c396f2897a72ef01d34790f928a30 Mon Sep 17 00:00:00 2001 From: pwseg Date: Mon, 20 Oct 2025 10:55:42 -0500 Subject: [PATCH 06/10] rename AGAIN plz work --- .github/workflows/new-files-report.yml | 13 +++--- .github/workflows/new-pages-report.yml | 58 -------------------------- 2 files changed, 7 insertions(+), 64 deletions(-) delete mode 100644 .github/workflows/new-pages-report.yml diff --git a/.github/workflows/new-files-report.yml b/.github/workflows/new-files-report.yml index 60664a3fbc..781018e8e0 100644 --- a/.github/workflows/new-files-report.yml +++ b/.github/workflows/new-files-report.yml @@ -2,8 +2,8 @@ name: New Files Report on: schedule: - - cron: '0 14 * * 1' # Every Monday at 2pm UTC - workflow_dispatch: # Manual trigger from Actions tab + - cron: '0 16 * * 5' # This will run automatically every Friday at noon Eastern + workflow_dispatch: # We can also trigger it manually from the Actions tab jobs: report: @@ -19,10 +19,10 @@ jobs: - name: Generate report id: report run: | - echo "## New Files Since August 30, 2025" > report.md + echo "## New files added since September 17, 2025" > report.md echo "" >> report.md - FILES=$(git log --since="2025-08-30" --diff-filter=A --name-only --pretty=format:"" -- src/ 2>/dev/null | grep -v '^$' | sort -u || echo "") + FILES=$(git log --since="2025-09-17" --diff-filter=A --name-only --pretty=format:"" -- src/ 2>/dev/null | grep -v '^$' | sort -u || echo "") if [ -z "$FILES" ]; then echo "No new files found." >> report.md @@ -51,7 +51,8 @@ jobs: github.rest.issues.create({ owner: context.repo.owner, repo: context.repo.repo, - title: `New Files Report - ${today}`, + title: `New files report - ${today}`, body: report, - labels: ['documentation', 'migration'] + labels: ['migration'], + assignees: ['pwseg'] }); \ No newline at end of file diff --git a/.github/workflows/new-pages-report.yml b/.github/workflows/new-pages-report.yml deleted file mode 100644 index 781018e8e0..0000000000 --- a/.github/workflows/new-pages-report.yml +++ /dev/null @@ -1,58 +0,0 @@ -# .github/workflows/new-pages-report.yml -name: New Files Report -on: - schedule: - - cron: '0 16 * * 5' # This will run automatically every Friday at noon Eastern - workflow_dispatch: # We can also trigger it manually from the Actions tab - -jobs: - report: - runs-on: ubuntu-latest - permissions: - issues: write - contents: read - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Generate report - id: report - run: | - echo "## New files added since September 17, 2025" > report.md - echo "" >> report.md - - FILES=$(git log --since="2025-09-17" --diff-filter=A --name-only --pretty=format:"" -- src/ 2>/dev/null | grep -v '^$' | sort -u || echo "") - - if [ -z "$FILES" ]; then - echo "No new files found." >> report.md - else - echo "$FILES" | while read file; do - if [ -n "$file" ]; then - COMMIT=$(git log --diff-filter=A --format="%h" -- "$file" | head -1) - DATE=$(git log --diff-filter=A --format="%ad" --date=short -- "$file" | head -1) - MSG=$(git log --diff-filter=A --format="%s" -- "$file" | head -1) - echo "- **$DATE**: \`$file\` - $MSG ([${COMMIT}](../../commit/${COMMIT}))" >> report.md - fi - done - fi - - echo "" >> report.md - echo "_Report generated on $(date +'%Y-%m-%d %H:%M UTC')_" >> report.md - - - name: Create issue - uses: actions/github-script@v7 - with: - script: | - const fs = require('fs'); - const report = fs.readFileSync('report.md', 'utf8'); - const today = new Date().toISOString().split('T')[0]; - - github.rest.issues.create({ - owner: context.repo.owner, - repo: context.repo.repo, - title: `New files report - ${today}`, - body: report, - labels: ['migration'], - assignees: ['pwseg'] - }); \ No newline at end of file From a08a618fd4632a7e72a3bdf4878b5186f12697b3 Mon Sep 17 00:00:00 2001 From: pwseg Date: Mon, 20 Oct 2025 11:00:40 -0500 Subject: [PATCH 07/10] final touchup --- .github/workflows/new-files-report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-files-report.yml b/.github/workflows/new-files-report.yml index 781018e8e0..dbeede34c4 100644 --- a/.github/workflows/new-files-report.yml +++ b/.github/workflows/new-files-report.yml @@ -1,4 +1,4 @@ -# .github/workflows/new-pages-report.yml +# .github/workflows/new-files-report.yml name: New Files Report on: schedule: From 57175f442c9a733e2ae878fbd5fab39b8897ebce Mon Sep 17 00:00:00 2001 From: pwseg Date: Mon, 20 Oct 2025 11:13:54 -0500 Subject: [PATCH 08/10] delete comment, probably don't need it --- .github/workflows/new-files-report.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/new-files-report.yml b/.github/workflows/new-files-report.yml index dbeede34c4..58947bcafd 100644 --- a/.github/workflows/new-files-report.yml +++ b/.github/workflows/new-files-report.yml @@ -1,4 +1,3 @@ -# .github/workflows/new-files-report.yml name: New Files Report on: schedule: From e316341a9f074997ca86402c1ecfaf657860de7d Mon Sep 17 00:00:00 2001 From: pwseg Date: Mon, 20 Oct 2025 11:17:37 -0500 Subject: [PATCH 09/10] limit to our repo in case someone forks it --- .github/workflows/new-files-report.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/new-files-report.yml b/.github/workflows/new-files-report.yml index 58947bcafd..99d1a8b83a 100644 --- a/.github/workflows/new-files-report.yml +++ b/.github/workflows/new-files-report.yml @@ -6,6 +6,7 @@ on: jobs: report: + if: github.repository == 'segmentio/segment-docs' runs-on: ubuntu-latest permissions: issues: write @@ -18,10 +19,10 @@ jobs: - name: Generate report id: report run: | - echo "## New files added since September 17, 2025" > report.md + echo "## New Files Since August 30, 2025" > report.md echo "" >> report.md - FILES=$(git log --since="2025-09-17" --diff-filter=A --name-only --pretty=format:"" -- src/ 2>/dev/null | grep -v '^$' | sort -u || echo "") + FILES=$(git log --since="2025-08-30" --diff-filter=A --name-only --pretty=format:"" -- src/ 2>/dev/null | grep -v '^$' | sort -u || echo "") if [ -z "$FILES" ]; then echo "No new files found." >> report.md @@ -50,8 +51,8 @@ jobs: github.rest.issues.create({ owner: context.repo.owner, repo: context.repo.repo, - title: `New files report - ${today}`, + title: `New Files Report - ${today}`, body: report, labels: ['migration'], - assignees: ['pwseg'] + assignees: ['daseg'] }); \ No newline at end of file From 86272eef35665235616e7c963124d3eb25311e88 Mon Sep 17 00:00:00 2001 From: pwseg Date: Mon, 20 Oct 2025 15:12:15 -0500 Subject: [PATCH 10/10] change date to July 20th --- .github/workflows/new-files-report.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/new-files-report.yml b/.github/workflows/new-files-report.yml index 99d1a8b83a..028f14cba8 100644 --- a/.github/workflows/new-files-report.yml +++ b/.github/workflows/new-files-report.yml @@ -19,10 +19,10 @@ jobs: - name: Generate report id: report run: | - echo "## New Files Since August 30, 2025" > report.md + echo "## New files since July 20th, 2025" > report.md echo "" >> report.md - FILES=$(git log --since="2025-08-30" --diff-filter=A --name-only --pretty=format:"" -- src/ 2>/dev/null | grep -v '^$' | sort -u || echo "") + FILES=$(git log --since="2025-07-20" --diff-filter=A --name-only --pretty=format:"" -- src/ 2>/dev/null | grep -v '^$' | sort -u || echo "") if [ -z "$FILES" ]; then echo "No new files found." >> report.md @@ -51,8 +51,8 @@ jobs: github.rest.issues.create({ owner: context.repo.owner, repo: context.repo.repo, - title: `New Files Report - ${today}`, + title: `New files report - ${today}`, body: report, labels: ['migration'], - assignees: ['daseg'] + assignees: ['pwseg'] }); \ No newline at end of file