From 51487557de4e6f52e5844b0daa264cbfaef2347e Mon Sep 17 00:00:00 2001 From: Tierney Cyren Date: Thu, 11 Apr 2024 16:31:10 +0900 Subject: [PATCH] feat: add issue metrics for all twilio and sendgrid helper libraries, plus the Twilio CLI (#29) Signed-off-by: Tierney Cyren --- .../issue-metrics-sendgrid-csharp.yml | 51 +++++++++++++++++++ .../workflows/issue-metrics-sendgrid-go.yml | 51 +++++++++++++++++++ .../workflows/issue-metrics-sendgrid-java.yml | 51 +++++++++++++++++++ .../issue-metrics-sendgrid-nodejs.yml | 2 +- .../workflows/issue-metrics-sendgrid-php.yml | 51 +++++++++++++++++++ .../issue-metrics-sendgrid-python.yml | 51 +++++++++++++++++++ .../workflows/issue-metrics-sendgrid-ruby.yml | 51 +++++++++++++++++++ .../workflows/issue-metrics-twilio-cli.yml | 51 +++++++++++++++++++ .../workflows/issue-metrics-twilio-csharp.yml | 51 +++++++++++++++++++ .github/workflows/issue-metrics-twilio-go.yml | 51 +++++++++++++++++++ .../workflows/issue-metrics-twilio-java.yml | 51 +++++++++++++++++++ .../workflows/issue-metrics-twilio-node.yml | 6 +-- .../workflows/issue-metrics-twilio-php.yml | 51 +++++++++++++++++++ .../workflows/issue-metrics-twilio-python.yml | 51 +++++++++++++++++++ .../workflows/issue-metrics-twilio-ruby.yml | 51 +++++++++++++++++++ package.json | 15 +++++- utilities/metrics/sendgrid-csharp.js | 12 +++++ utilities/metrics/sendgrid-go.js | 12 +++++ utilities/metrics/sendgrid-java.js | 12 +++++ utilities/metrics/sendgrid-php.js | 12 +++++ utilities/metrics/sendgrid-python.js | 12 +++++ utilities/metrics/sendgrid-ruby.js | 12 +++++ utilities/metrics/twilio-cli.js | 12 +++++ utilities/metrics/twilio-csharp.js | 12 +++++ utilities/metrics/twilio-go.js | 12 +++++ utilities/metrics/twilio-java.js | 12 +++++ utilities/metrics/twilio-php.js | 12 +++++ utilities/metrics/twilio-python.js | 12 +++++ utilities/metrics/twilio-ruby.js | 12 +++++ 29 files changed, 837 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/issue-metrics-sendgrid-csharp.yml create mode 100644 .github/workflows/issue-metrics-sendgrid-go.yml create mode 100644 .github/workflows/issue-metrics-sendgrid-java.yml create mode 100644 .github/workflows/issue-metrics-sendgrid-php.yml create mode 100644 .github/workflows/issue-metrics-sendgrid-python.yml create mode 100644 .github/workflows/issue-metrics-sendgrid-ruby.yml create mode 100644 .github/workflows/issue-metrics-twilio-cli.yml create mode 100644 .github/workflows/issue-metrics-twilio-csharp.yml create mode 100644 .github/workflows/issue-metrics-twilio-go.yml create mode 100644 .github/workflows/issue-metrics-twilio-java.yml create mode 100644 .github/workflows/issue-metrics-twilio-php.yml create mode 100644 .github/workflows/issue-metrics-twilio-python.yml create mode 100644 .github/workflows/issue-metrics-twilio-ruby.yml create mode 100644 utilities/metrics/sendgrid-csharp.js create mode 100644 utilities/metrics/sendgrid-go.js create mode 100644 utilities/metrics/sendgrid-java.js create mode 100644 utilities/metrics/sendgrid-php.js create mode 100644 utilities/metrics/sendgrid-python.js create mode 100644 utilities/metrics/sendgrid-ruby.js create mode 100644 utilities/metrics/twilio-cli.js create mode 100644 utilities/metrics/twilio-csharp.js create mode 100644 utilities/metrics/twilio-go.js create mode 100644 utilities/metrics/twilio-java.js create mode 100644 utilities/metrics/twilio-php.js create mode 100644 utilities/metrics/twilio-python.js create mode 100644 utilities/metrics/twilio-ruby.js diff --git a/.github/workflows/issue-metrics-sendgrid-csharp.yml b/.github/workflows/issue-metrics-sendgrid-csharp.yml new file mode 100644 index 0000000..e5ade80 --- /dev/null +++ b/.github/workflows/issue-metrics-sendgrid-csharp.yml @@ -0,0 +1,51 @@ +name: Issue Metrics (sendgrid/sendgrid-csharp) +on: + workflow_dispatch: + schedule: + - cron: '0 0 1 * *' +jobs: + build: + name: Issue Metrics (sendgrid/sendgrid-csharp) + runs-on: ubuntu-latest + steps: + - name: Get dates for last month + shell: bash + run: | + # Calculate the first day of the previous month + first_day=$(date -d "last month" +%Y-%m-01) + + # Calculate the last day of the previous month + last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d) + + #Set an environment variable with the date range + echo "$first_day..$last_day" + echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV" + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Run issue-metrics tool + uses: github/issue-metrics@v2 + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SEARCH_QUERY: 'repo:sendgrid/sendgrid-csharp is:issue created:${{ env.last_month }}' + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 'latest' + - name: Update npm + run: npm install -g npm + - name: Install dependencies + run: npm install + - name: Move Generated Metrics File to Storage + run: npm run convert:metrics:sendgrid-csharp + - name: Run gr2m/create-or-update-pull-request + uses: gr2m/create-or-update-pull-request-action@v1 # Create a PR or update the Action's existing PR + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + body: > + Monthly metrics report, automatically generated with GitHub Actions. + branch: actions/metrics # Custom branch *just* for this Action. + commit-message: 'doc: generate metrics report for sendgrid/sendgrid-csharp' + title: 'doc: generate metrics report' + assignees: bnb # change to whoever you want to be assigned to this PR + auto-merge: squash \ No newline at end of file diff --git a/.github/workflows/issue-metrics-sendgrid-go.yml b/.github/workflows/issue-metrics-sendgrid-go.yml new file mode 100644 index 0000000..f82e694 --- /dev/null +++ b/.github/workflows/issue-metrics-sendgrid-go.yml @@ -0,0 +1,51 @@ +name: Issue Metrics (sendgrid/sendgrid-go) +on: + workflow_dispatch: + schedule: + - cron: '0 0 1 * *' +jobs: + build: + name: Issue Metrics (sendgrid/sendgrid-go) + runs-on: ubuntu-latest + steps: + - name: Get dates for last month + shell: bash + run: | + # Calculate the first day of the previous month + first_day=$(date -d "last month" +%Y-%m-01) + + # Calculate the last day of the previous month + last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d) + + #Set an environment variable with the date range + echo "$first_day..$last_day" + echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV" + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Run issue-metrics tool + uses: github/issue-metrics@v2 + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SEARCH_QUERY: 'repo:sendgrid/sendgrid-go is:issue created:${{ env.last_month }}' + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 'latest' + - name: Update npm + run: npm install -g npm + - name: Install dependencies + run: npm install + - name: Move Generated Metrics File to Storage + run: npm run convert:metrics:sendgrid-go + - name: Run gr2m/create-or-update-pull-request + uses: gr2m/create-or-update-pull-request-action@v1 # Create a PR or update the Action's existing PR + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + body: > + Monthly metrics report, automatically generated with GitHub Actions. + branch: actions/metrics # Custom branch *just* for this Action. + commit-message: 'doc: generate metrics report for sendgrid/sendgrid-go' + title: 'doc: generate metrics report' + assignees: bnb # change to whoever you want to be assigned to this PR + auto-merge: squash \ No newline at end of file diff --git a/.github/workflows/issue-metrics-sendgrid-java.yml b/.github/workflows/issue-metrics-sendgrid-java.yml new file mode 100644 index 0000000..686f906 --- /dev/null +++ b/.github/workflows/issue-metrics-sendgrid-java.yml @@ -0,0 +1,51 @@ +name: Issue Metrics (sendgrid/sendgrid-java) +on: + workflow_dispatch: + schedule: + - cron: '0 0 1 * *' +jobs: + build: + name: Issue Metrics (sendgrid/sendgrid-java) + runs-on: ubuntu-latest + steps: + - name: Get dates for last month + shell: bash + run: | + # Calculate the first day of the previous month + first_day=$(date -d "last month" +%Y-%m-01) + + # Calculate the last day of the previous month + last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d) + + #Set an environment variable with the date range + echo "$first_day..$last_day" + echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV" + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Run issue-metrics tool + uses: github/issue-metrics@v2 + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SEARCH_QUERY: 'repo:sendgrid/sendgrid-java is:issue created:${{ env.last_month }}' + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 'latest' + - name: Update npm + run: npm install -g npm + - name: Install dependencies + run: npm install + - name: Move Generated Metrics File to Storage + run: npm run convert:metrics:sendgrid-java + - name: Run gr2m/create-or-update-pull-request + uses: gr2m/create-or-update-pull-request-action@v1 # Create a PR or update the Action's existing PR + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + body: > + Monthly metrics report, automatically generated with GitHub Actions. + branch: actions/metrics # Custom branch *just* for this Action. + commit-message: 'doc: generate metrics report for sendgrid/sendgrid-java' + title: 'doc: generate metrics report' + assignees: bnb # change to whoever you want to be assigned to this PR + auto-merge: squash \ No newline at end of file diff --git a/.github/workflows/issue-metrics-sendgrid-nodejs.yml b/.github/workflows/issue-metrics-sendgrid-nodejs.yml index 65d56e8..2ce78fa 100644 --- a/.github/workflows/issue-metrics-sendgrid-nodejs.yml +++ b/.github/workflows/issue-metrics-sendgrid-nodejs.yml @@ -43,7 +43,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: body: > - Monthly metrics report for sendgrid/sendgrid-nodejs, automatically generated with GitHub Actions. + Monthly metrics report, automatically generated with GitHub Actions. branch: actions/metrics # Custom branch *just* for this Action. commit-message: 'doc: generate metrics report for sendgrid/sendgrid-nodejs' title: 'doc: generate metrics report' diff --git a/.github/workflows/issue-metrics-sendgrid-php.yml b/.github/workflows/issue-metrics-sendgrid-php.yml new file mode 100644 index 0000000..4c35f9a --- /dev/null +++ b/.github/workflows/issue-metrics-sendgrid-php.yml @@ -0,0 +1,51 @@ +name: Issue Metrics (sendgrid/sendgrid-php) +on: + workflow_dispatch: + schedule: + - cron: '0 0 1 * *' +jobs: + build: + name: Issue Metrics (sendgrid/sendgrid-php) + runs-on: ubuntu-latest + steps: + - name: Get dates for last month + shell: bash + run: | + # Calculate the first day of the previous month + first_day=$(date -d "last month" +%Y-%m-01) + + # Calculate the last day of the previous month + last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d) + + #Set an environment variable with the date range + echo "$first_day..$last_day" + echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV" + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Run issue-metrics tool + uses: github/issue-metrics@v2 + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SEARCH_QUERY: 'repo:sendgrid/sendgrid-php is:issue created:${{ env.last_month }}' + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 'latest' + - name: Update npm + run: npm install -g npm + - name: Install dependencies + run: npm install + - name: Move Generated Metrics File to Storage + run: npm run convert:metrics:sendgrid-php + - name: Run gr2m/create-or-update-pull-request + uses: gr2m/create-or-update-pull-request-action@v1 # Create a PR or update the Action's existing PR + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + body: > + Monthly metrics report, automatically generated with GitHub Actions. + branch: actions/metrics # Custom branch *just* for this Action. + commit-message: 'doc: generate metrics report for sendgrid/sendgrid-php' + title: 'doc: generate metrics report' + assignees: bnb # change to whoever you want to be assigned to this PR + auto-merge: squash \ No newline at end of file diff --git a/.github/workflows/issue-metrics-sendgrid-python.yml b/.github/workflows/issue-metrics-sendgrid-python.yml new file mode 100644 index 0000000..7d4b29e --- /dev/null +++ b/.github/workflows/issue-metrics-sendgrid-python.yml @@ -0,0 +1,51 @@ +name: Issue Metrics (sendgrid/sendgrid-python) +on: + workflow_dispatch: + schedule: + - cron: '0 0 1 * *' +jobs: + build: + name: Issue Metrics (sendgrid/sendgrid-python) + runs-on: ubuntu-latest + steps: + - name: Get dates for last month + shell: bash + run: | + # Calculate the first day of the previous month + first_day=$(date -d "last month" +%Y-%m-01) + + # Calculate the last day of the previous month + last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d) + + #Set an environment variable with the date range + echo "$first_day..$last_day" + echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV" + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Run issue-metrics tool + uses: github/issue-metrics@v2 + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SEARCH_QUERY: 'repo:sendgrid/sendgrid-python is:issue created:${{ env.last_month }}' + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 'latest' + - name: Update npm + run: npm install -g npm + - name: Install dependencies + run: npm install + - name: Move Generated Metrics File to Storage + run: npm run convert:metrics:sendgrid-python + - name: Run gr2m/create-or-update-pull-request + uses: gr2m/create-or-update-pull-request-action@v1 # Create a PR or update the Action's existing PR + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + body: > + Monthly metrics report, automatically generated with GitHub Actions. + branch: actions/metrics # Custom branch *just* for this Action. + commit-message: 'doc: generate metrics report for sendgrid/sendgrid-python' + title: 'doc: generate metrics report' + assignees: bnb # change to whoever you want to be assigned to this PR + auto-merge: squash \ No newline at end of file diff --git a/.github/workflows/issue-metrics-sendgrid-ruby.yml b/.github/workflows/issue-metrics-sendgrid-ruby.yml new file mode 100644 index 0000000..abb0c8c --- /dev/null +++ b/.github/workflows/issue-metrics-sendgrid-ruby.yml @@ -0,0 +1,51 @@ +name: Issue Metrics (sendgrid/sendgrid-ruby) +on: + workflow_dispatch: + schedule: + - cron: '0 0 1 * *' +jobs: + build: + name: Issue Metrics (sendgrid/sendgrid-ruby) + runs-on: ubuntu-latest + steps: + - name: Get dates for last month + shell: bash + run: | + # Calculate the first day of the previous month + first_day=$(date -d "last month" +%Y-%m-01) + + # Calculate the last day of the previous month + last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d) + + #Set an environment variable with the date range + echo "$first_day..$last_day" + echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV" + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Run issue-metrics tool + uses: github/issue-metrics@v2 + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SEARCH_QUERY: 'repo:sendgrid/sendgrid-ruby is:issue created:${{ env.last_month }}' + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 'latest' + - name: Update npm + run: npm install -g npm + - name: Install dependencies + run: npm install + - name: Move Generated Metrics File to Storage + run: npm run convert:metrics:sendgrid-ruby + - name: Run gr2m/create-or-update-pull-request + uses: gr2m/create-or-update-pull-request-action@v1 # Create a PR or update the Action's existing PR + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + body: > + Monthly metrics report, automatically generated with GitHub Actions. + branch: actions/metrics # Custom branch *just* for this Action. + commit-message: 'doc: generate metrics report for sendgrid/sendgrid-ruby' + title: 'doc: generate metrics report' + assignees: bnb # change to whoever you want to be assigned to this PR + auto-merge: squash \ No newline at end of file diff --git a/.github/workflows/issue-metrics-twilio-cli.yml b/.github/workflows/issue-metrics-twilio-cli.yml new file mode 100644 index 0000000..94474a7 --- /dev/null +++ b/.github/workflows/issue-metrics-twilio-cli.yml @@ -0,0 +1,51 @@ +name: Issue Metrics (twilio/twilio-cli) +on: + workflow_dispatch: + schedule: + - cron: '0 0 1 * *' +jobs: + build: + name: Issue Metrics (twilio/twilio-cli) + runs-on: ubuntu-latest + steps: + - name: Get Dates for Last Month + shell: bash + run: | + # Calculate the first day of the previous month + first_day=$(date -d "last month" +%Y-%m-01) + + # Calculate the last day of the previous month + last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d) + + #Set an environment variable with the date range + echo "$first_day..$last_day" + echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV" + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Run issue-metrics Tool + uses: github/issue-metrics@v2 + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SEARCH_QUERY: 'repo:twilio/twilio-cli is:issue created:${{ env.last_month }}' + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 'latest' + - name: Update npm + run: npm install -g npm + - name: Install dependencies + run: npm install + - name: Move Generated Metrics File to Storage + run: npm run convert:metrics:twilio-cli + - name: Run gr2m/create-or-update-pull-request + uses: gr2m/create-or-update-pull-request-action@v1 # Create a PR or update the Action's existing PR + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + body: > + Monthly metrics report, automatically generated with GitHub Actions. + branch: actions/metrics # Custom branch *just* for this Action. + commit-message: 'doc: generate metrics report for twilio/twilio-cli' + title: 'doc: generate metrics report' + assignees: bnb # change to whoever you want to be assigned to this PR + auto-merge: squash \ No newline at end of file diff --git a/.github/workflows/issue-metrics-twilio-csharp.yml b/.github/workflows/issue-metrics-twilio-csharp.yml new file mode 100644 index 0000000..977dcd4 --- /dev/null +++ b/.github/workflows/issue-metrics-twilio-csharp.yml @@ -0,0 +1,51 @@ +name: Issue Metrics (twilio/twilio-csharp) +on: + workflow_dispatch: + schedule: + - cron: '0 0 1 * *' +jobs: + build: + name: Issue Metrics (twilio/twilio-csharp) + runs-on: ubuntu-latest + steps: + - name: Get Dates for Last Month + shell: bash + run: | + # Calculate the first day of the previous month + first_day=$(date -d "last month" +%Y-%m-01) + + # Calculate the last day of the previous month + last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d) + + #Set an environment variable with the date range + echo "$first_day..$last_day" + echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV" + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Run issue-metrics Tool + uses: github/issue-metrics@v2 + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SEARCH_QUERY: 'repo:twilio/twilio-csharp is:issue created:${{ env.last_month }}' + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 'latest' + - name: Update npm + run: npm install -g npm + - name: Install dependencies + run: npm install + - name: Move Generated Metrics File to Storage + run: npm run convert:metrics:twilio-csharp + - name: Run gr2m/create-or-update-pull-request + uses: gr2m/create-or-update-pull-request-action@v1 # Create a PR or update the Action's existing PR + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + body: > + Monthly metrics report, automatically generated with GitHub Actions. + branch: actions/metrics # Custom branch *just* for this Action. + commit-message: 'doc: generate metrics report for twilio/twilio-csharp' + title: 'doc: generate metrics report' + assignees: bnb # change to whoever you want to be assigned to this PR + auto-merge: squash \ No newline at end of file diff --git a/.github/workflows/issue-metrics-twilio-go.yml b/.github/workflows/issue-metrics-twilio-go.yml new file mode 100644 index 0000000..fb30135 --- /dev/null +++ b/.github/workflows/issue-metrics-twilio-go.yml @@ -0,0 +1,51 @@ +name: Issue Metrics (twilio/twilio-go) +on: + workflow_dispatch: + schedule: + - cron: '0 0 1 * *' +jobs: + build: + name: Issue Metrics (twilio/twilio-go) + runs-on: ubuntu-latest + steps: + - name: Get Dates for Last Month + shell: bash + run: | + # Calculate the first day of the previous month + first_day=$(date -d "last month" +%Y-%m-01) + + # Calculate the last day of the previous month + last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d) + + #Set an environment variable with the date range + echo "$first_day..$last_day" + echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV" + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Run issue-metrics Tool + uses: github/issue-metrics@v2 + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SEARCH_QUERY: 'repo:twilio/twilio-go is:issue created:${{ env.last_month }}' + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 'latest' + - name: Update npm + run: npm install -g npm + - name: Install dependencies + run: npm install + - name: Move Generated Metrics File to Storage + run: npm run convert:metrics:twilio-go + - name: Run gr2m/create-or-update-pull-request + uses: gr2m/create-or-update-pull-request-action@v1 # Create a PR or update the Action's existing PR + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + body: > + Monthly metrics report, automatically generated with GitHub Actions. + branch: actions/metrics # Custom branch *just* for this Action. + commit-message: 'doc: generate metrics report for twilio/twilio-go' + title: 'doc: generate metrics report' + assignees: bnb # change to whoever you want to be assigned to this PR + auto-merge: squash \ No newline at end of file diff --git a/.github/workflows/issue-metrics-twilio-java.yml b/.github/workflows/issue-metrics-twilio-java.yml new file mode 100644 index 0000000..1577c0d --- /dev/null +++ b/.github/workflows/issue-metrics-twilio-java.yml @@ -0,0 +1,51 @@ +name: Issue Metrics (twilio/twilio-java) +on: + workflow_dispatch: + schedule: + - cron: '0 0 1 * *' +jobs: + build: + name: Issue Metrics (twilio/twilio-java) + runs-on: ubuntu-latest + steps: + - name: Get Dates for Last Month + shell: bash + run: | + # Calculate the first day of the previous month + first_day=$(date -d "last month" +%Y-%m-01) + + # Calculate the last day of the previous month + last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d) + + #Set an environment variable with the date range + echo "$first_day..$last_day" + echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV" + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Run issue-metrics Tool + uses: github/issue-metrics@v2 + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SEARCH_QUERY: 'repo:twilio/twilio-java is:issue created:${{ env.last_month }}' + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 'latest' + - name: Update npm + run: npm install -g npm + - name: Install dependencies + run: npm install + - name: Move Generated Metrics File to Storage + run: npm run convert:metrics:twilio-java + - name: Run gr2m/create-or-update-pull-request + uses: gr2m/create-or-update-pull-request-action@v1 # Create a PR or update the Action's existing PR + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + body: > + Monthly metrics report, automatically generated with GitHub Actions. + branch: actions/metrics # Custom branch *just* for this Action. + commit-message: 'doc: generate metrics report for twilio/twilio-java' + title: 'doc: generate metrics report' + assignees: bnb # change to whoever you want to be assigned to this PR + auto-merge: squash \ No newline at end of file diff --git a/.github/workflows/issue-metrics-twilio-node.yml b/.github/workflows/issue-metrics-twilio-node.yml index e14f7b9..48c8169 100644 --- a/.github/workflows/issue-metrics-twilio-node.yml +++ b/.github/workflows/issue-metrics-twilio-node.yml @@ -1,11 +1,11 @@ -name: Issue Metrics (twilio-node) +name: Issue Metrics (twilio/twilio-node) on: workflow_dispatch: schedule: - cron: '0 0 1 * *' jobs: build: - name: Issue Metrics (twilio-node) + name: Issue Metrics (twilio/twilio-node) runs-on: ubuntu-latest steps: - name: Get Dates for Last Month @@ -43,7 +43,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: body: > - Monthly metrics report for twilio/twilio-node, automatically generated with GitHub Actions. + Monthly metrics report, automatically generated with GitHub Actions. branch: actions/metrics # Custom branch *just* for this Action. commit-message: 'doc: generate metrics report for twilio/twilio-node' title: 'doc: generate metrics report' diff --git a/.github/workflows/issue-metrics-twilio-php.yml b/.github/workflows/issue-metrics-twilio-php.yml new file mode 100644 index 0000000..70303f8 --- /dev/null +++ b/.github/workflows/issue-metrics-twilio-php.yml @@ -0,0 +1,51 @@ +name: Issue Metrics (twilio/twilio-php) +on: + workflow_dispatch: + schedule: + - cron: '0 0 1 * *' +jobs: + build: + name: Issue Metrics (twilio/twilio-php) + runs-on: ubuntu-latest + steps: + - name: Get Dates for Last Month + shell: bash + run: | + # Calculate the first day of the previous month + first_day=$(date -d "last month" +%Y-%m-01) + + # Calculate the last day of the previous month + last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d) + + #Set an environment variable with the date range + echo "$first_day..$last_day" + echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV" + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Run issue-metrics Tool + uses: github/issue-metrics@v2 + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SEARCH_QUERY: 'repo:twilio/twilio-php is:issue created:${{ env.last_month }}' + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 'latest' + - name: Update npm + run: npm install -g npm + - name: Install dependencies + run: npm install + - name: Move Generated Metrics File to Storage + run: npm run convert:metrics:twilio-php + - name: Run gr2m/create-or-update-pull-request + uses: gr2m/create-or-update-pull-request-action@v1 # Create a PR or update the Action's existing PR + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + body: > + Monthly metrics report, automatically generated with GitHub Actions. + branch: actions/metrics # Custom branch *just* for this Action. + commit-message: 'doc: generate metrics report for twilio/twilio-php' + title: 'doc: generate metrics report' + assignees: bnb # change to whoever you want to be assigned to this PR + auto-merge: squash \ No newline at end of file diff --git a/.github/workflows/issue-metrics-twilio-python.yml b/.github/workflows/issue-metrics-twilio-python.yml new file mode 100644 index 0000000..6e431c2 --- /dev/null +++ b/.github/workflows/issue-metrics-twilio-python.yml @@ -0,0 +1,51 @@ +name: Issue Metrics (twilio/twilio-python) +on: + workflow_dispatch: + schedule: + - cron: '0 0 1 * *' +jobs: + build: + name: Issue Metrics (twilio/twilio-python) + runs-on: ubuntu-latest + steps: + - name: Get Dates for Last Month + shell: bash + run: | + # Calculate the first day of the previous month + first_day=$(date -d "last month" +%Y-%m-01) + + # Calculate the last day of the previous month + last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d) + + #Set an environment variable with the date range + echo "$first_day..$last_day" + echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV" + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Run issue-metrics Tool + uses: github/issue-metrics@v2 + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SEARCH_QUERY: 'repo:twilio/twilio-python is:issue created:${{ env.last_month }}' + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 'latest' + - name: Update npm + run: npm install -g npm + - name: Install dependencies + run: npm install + - name: Move Generated Metrics File to Storage + run: npm run convert:metrics:twilio-python + - name: Run gr2m/create-or-update-pull-request + uses: gr2m/create-or-update-pull-request-action@v1 # Create a PR or update the Action's existing PR + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + body: > + Monthly metrics report, automatically generated with GitHub Actions. + branch: actions/metrics # Custom branch *just* for this Action. + commit-message: 'doc: generate metrics report for twilio/twilio-python' + title: 'doc: generate metrics report' + assignees: bnb # change to whoever you want to be assigned to this PR + auto-merge: squash \ No newline at end of file diff --git a/.github/workflows/issue-metrics-twilio-ruby.yml b/.github/workflows/issue-metrics-twilio-ruby.yml new file mode 100644 index 0000000..d0f41cb --- /dev/null +++ b/.github/workflows/issue-metrics-twilio-ruby.yml @@ -0,0 +1,51 @@ +name: Issue Metrics (twilio/twilio-ruby) +on: + workflow_dispatch: + schedule: + - cron: '0 0 1 * *' +jobs: + build: + name: Issue Metrics (twilio/twilio-ruby) + runs-on: ubuntu-latest + steps: + - name: Get Dates for Last Month + shell: bash + run: | + # Calculate the first day of the previous month + first_day=$(date -d "last month" +%Y-%m-01) + + # Calculate the last day of the previous month + last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d) + + #Set an environment variable with the date range + echo "$first_day..$last_day" + echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV" + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Run issue-metrics Tool + uses: github/issue-metrics@v2 + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SEARCH_QUERY: 'repo:twilio/twilio-ruby is:issue created:${{ env.last_month }}' + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 'latest' + - name: Update npm + run: npm install -g npm + - name: Install dependencies + run: npm install + - name: Move Generated Metrics File to Storage + run: npm run convert:metrics:twilio-ruby + - name: Run gr2m/create-or-update-pull-request + uses: gr2m/create-or-update-pull-request-action@v1 # Create a PR or update the Action's existing PR + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + body: > + Monthly metrics report, automatically generated with GitHub Actions. + branch: actions/metrics # Custom branch *just* for this Action. + commit-message: 'doc: generate metrics report for twilio/twilio-ruby' + title: 'doc: generate metrics report' + assignees: bnb # change to whoever you want to be assigned to this PR + auto-merge: squash \ No newline at end of file diff --git a/package.json b/package.json index 244ffb4..1abddf0 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,20 @@ "convert:contributors:twilio-labs": "node utilities/convertContributors/twilio-labs.js", "convert:contributors:twilio-samples": "node utilities/convertContributors/twilio-samples.js", "convert:metrics:sendgrid-nodejs": "node utilities/metrics/sendgrid-nodejs", - "convert:metrics:twilio-node": "node utilities/metrics/twilio-node" + "convert:metrics:sendgrid-csharp": "node utilities/metrics/sendgrid-csharp", + "convert:metrics:sendgrid-php": "node utilities/metrics/sendgrid-php", + "convert:metrics:sendgrid-java": "node utilities/metrics/sendgrid-java", + "convert:metrics:sendgrid-python": "node utilities/metrics/sendgrid-python", + "convert:metrics:sendgrid-go": "node utilities/metrics/sendgrid-go", + "convert:metrics:sendgrid-ruby": "node utilities/metrics/sendgrid-ruby", + "convert:metrics:twilio-node": "node utilities/metrics/twilio-node", + "convert:metrics:twilio-python": "node utilities/metrics/twilio-python", + "convert:metrics:twilio-csharp": "node utilities/metrics/twilio-csharp", + "convert:metrics:twilio-java": "node utilities/metrics/twilio-java", + "convert:metrics:twilio-php": "node utilities/metrics/twilio-php", + "convert:metrics:twilio-go": "node utilities/metrics/twilio-go", + "convert:metrics:twilio-ruby": "node utilities/metrics/twilio-ruby", + "convert:metrics:twilio-cli": "node utilities/metrics/twilio-cli" }, "author": "Tierney Cyren (https://twilio.com)", "license": "MIT", diff --git a/utilities/metrics/sendgrid-csharp.js b/utilities/metrics/sendgrid-csharp.js new file mode 100644 index 0000000..21e77fc --- /dev/null +++ b/utilities/metrics/sendgrid-csharp.js @@ -0,0 +1,12 @@ +const convertToFileWithDate = require('../helpers/convertToFileWithDate') + +async function convertMetrics () { + try { + await convertToFileWithDate('./issue_metrics.md', './reports/metrics', 'sendgrid-csharp') + await convertToFileWithDate('./issue_metrics.json', './reports/metrics/json', 'sendgrid-csharp') + } catch (err) { + console.error(err) + } +} + +convertMetrics() \ No newline at end of file diff --git a/utilities/metrics/sendgrid-go.js b/utilities/metrics/sendgrid-go.js new file mode 100644 index 0000000..7243282 --- /dev/null +++ b/utilities/metrics/sendgrid-go.js @@ -0,0 +1,12 @@ +const convertToFileWithDate = require('../helpers/convertToFileWithDate') + +async function convertMetrics () { + try { + await convertToFileWithDate('./issue_metrics.md', './reports/metrics', 'sendgrid-go') + await convertToFileWithDate('./issue_metrics.json', './reports/metrics/json', 'sendgrid-go') + } catch (err) { + console.error(err) + } +} + +convertMetrics() \ No newline at end of file diff --git a/utilities/metrics/sendgrid-java.js b/utilities/metrics/sendgrid-java.js new file mode 100644 index 0000000..93db896 --- /dev/null +++ b/utilities/metrics/sendgrid-java.js @@ -0,0 +1,12 @@ +const convertToFileWithDate = require('../helpers/convertToFileWithDate') + +async function convertMetrics () { + try { + await convertToFileWithDate('./issue_metrics.md', './reports/metrics', 'sendgrid-java') + await convertToFileWithDate('./issue_metrics.json', './reports/metrics/json', 'sendgrid-java') + } catch (err) { + console.error(err) + } +} + +convertMetrics() \ No newline at end of file diff --git a/utilities/metrics/sendgrid-php.js b/utilities/metrics/sendgrid-php.js new file mode 100644 index 0000000..77c7d9c --- /dev/null +++ b/utilities/metrics/sendgrid-php.js @@ -0,0 +1,12 @@ +const convertToFileWithDate = require('../helpers/convertToFileWithDate') + +async function convertMetrics () { + try { + await convertToFileWithDate('./issue_metrics.md', './reports/metrics', 'sendgrid-php') + await convertToFileWithDate('./issue_metrics.json', './reports/metrics/json', 'sendgrid-php') + } catch (err) { + console.error(err) + } +} + +convertMetrics() \ No newline at end of file diff --git a/utilities/metrics/sendgrid-python.js b/utilities/metrics/sendgrid-python.js new file mode 100644 index 0000000..24cbdcd --- /dev/null +++ b/utilities/metrics/sendgrid-python.js @@ -0,0 +1,12 @@ +const convertToFileWithDate = require('../helpers/convertToFileWithDate') + +async function convertMetrics () { + try { + await convertToFileWithDate('./issue_metrics.md', './reports/metrics', 'sendgrid-python') + await convertToFileWithDate('./issue_metrics.json', './reports/metrics/json', 'sendgrid-python') + } catch (err) { + console.error(err) + } +} + +convertMetrics() \ No newline at end of file diff --git a/utilities/metrics/sendgrid-ruby.js b/utilities/metrics/sendgrid-ruby.js new file mode 100644 index 0000000..7001c6c --- /dev/null +++ b/utilities/metrics/sendgrid-ruby.js @@ -0,0 +1,12 @@ +const convertToFileWithDate = require('../helpers/convertToFileWithDate') + +async function convertMetrics () { + try { + await convertToFileWithDate('./issue_metrics.md', './reports/metrics', 'sendgrid-ruby') + await convertToFileWithDate('./issue_metrics.json', './reports/metrics/json', 'sendgrid-ruby') + } catch (err) { + console.error(err) + } +} + +convertMetrics() \ No newline at end of file diff --git a/utilities/metrics/twilio-cli.js b/utilities/metrics/twilio-cli.js new file mode 100644 index 0000000..269cf57 --- /dev/null +++ b/utilities/metrics/twilio-cli.js @@ -0,0 +1,12 @@ +const convertToFileWithDate = require('../helpers/convertToFileWithDate') + +async function convertMetrics () { + try { + await convertToFileWithDate('./issue_metrics.md', './reports/metrics', 'twilio-cli') + await convertToFileWithDate('./issue_metrics.json', './reports/metrics/json', 'twilio-cli') + } catch (err) { + console.error(err) + } +} + +convertMetrics() \ No newline at end of file diff --git a/utilities/metrics/twilio-csharp.js b/utilities/metrics/twilio-csharp.js new file mode 100644 index 0000000..3b7a009 --- /dev/null +++ b/utilities/metrics/twilio-csharp.js @@ -0,0 +1,12 @@ +const convertToFileWithDate = require('../helpers/convertToFileWithDate') + +async function convertMetrics () { + try { + await convertToFileWithDate('./issue_metrics.md', './reports/metrics', 'twilio-csharp') + await convertToFileWithDate('./issue_metrics.json', './reports/metrics/json', 'twilio-csharp') + } catch (err) { + console.error(err) + } +} + +convertMetrics() \ No newline at end of file diff --git a/utilities/metrics/twilio-go.js b/utilities/metrics/twilio-go.js new file mode 100644 index 0000000..655339e --- /dev/null +++ b/utilities/metrics/twilio-go.js @@ -0,0 +1,12 @@ +const convertToFileWithDate = require('../helpers/convertToFileWithDate') + +async function convertMetrics () { + try { + await convertToFileWithDate('./issue_metrics.md', './reports/metrics', 'twilio-go') + await convertToFileWithDate('./issue_metrics.json', './reports/metrics/json', 'twilio-go') + } catch (err) { + console.error(err) + } +} + +convertMetrics() \ No newline at end of file diff --git a/utilities/metrics/twilio-java.js b/utilities/metrics/twilio-java.js new file mode 100644 index 0000000..7200db8 --- /dev/null +++ b/utilities/metrics/twilio-java.js @@ -0,0 +1,12 @@ +const convertToFileWithDate = require('../helpers/convertToFileWithDate') + +async function convertMetrics () { + try { + await convertToFileWithDate('./issue_metrics.md', './reports/metrics', 'twilio-java') + await convertToFileWithDate('./issue_metrics.json', './reports/metrics/json', 'twilio-java') + } catch (err) { + console.error(err) + } +} + +convertMetrics() \ No newline at end of file diff --git a/utilities/metrics/twilio-php.js b/utilities/metrics/twilio-php.js new file mode 100644 index 0000000..d21de14 --- /dev/null +++ b/utilities/metrics/twilio-php.js @@ -0,0 +1,12 @@ +const convertToFileWithDate = require('../helpers/convertToFileWithDate') + +async function convertMetrics () { + try { + await convertToFileWithDate('./issue_metrics.md', './reports/metrics', 'twilio-php') + await convertToFileWithDate('./issue_metrics.json', './reports/metrics/json', 'twilio-php') + } catch (err) { + console.error(err) + } +} + +convertMetrics() \ No newline at end of file diff --git a/utilities/metrics/twilio-python.js b/utilities/metrics/twilio-python.js new file mode 100644 index 0000000..ad81448 --- /dev/null +++ b/utilities/metrics/twilio-python.js @@ -0,0 +1,12 @@ +const convertToFileWithDate = require('../helpers/convertToFileWithDate') + +async function convertMetrics () { + try { + await convertToFileWithDate('./issue_metrics.md', './reports/metrics', 'twilio-python') + await convertToFileWithDate('./issue_metrics.json', './reports/metrics/json', 'twilio-python') + } catch (err) { + console.error(err) + } +} + +convertMetrics() \ No newline at end of file diff --git a/utilities/metrics/twilio-ruby.js b/utilities/metrics/twilio-ruby.js new file mode 100644 index 0000000..bce163e --- /dev/null +++ b/utilities/metrics/twilio-ruby.js @@ -0,0 +1,12 @@ +const convertToFileWithDate = require('../helpers/convertToFileWithDate') + +async function convertMetrics () { + try { + await convertToFileWithDate('./issue_metrics.md', './reports/metrics', 'twilio-ruby') + await convertToFileWithDate('./issue_metrics.json', './reports/metrics/json', 'twilio-ruby') + } catch (err) { + console.error(err) + } +} + +convertMetrics() \ No newline at end of file