forked from awsdocs/aws-doc-sdk-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
79 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# This workflow searches for issues/pull requests/discussions in a repository, measures several metrics, | ||
# and generates a report in form of a GitHub issue. | ||
# | ||
# You can adjust the behavior by modifying this file. | ||
# For more information, see: | ||
# https://github.com/marketplace/actions/issue-metrics | ||
|
||
name: Monthly issue metrics | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '3 2 1 * *' | ||
|
||
permissions: | ||
issues: write | ||
pull-requests: read | ||
|
||
jobs: | ||
build: | ||
name: Issue metrics | ||
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 "last_month=$first_day..$last_day" >> "$GITHUB_ENV" | ||
- name: Run issue-metrics tool | ||
uses: github/issue-metrics@v2 | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SEARCH_QUERY: 'repo:awsdocs/aws-doc-sdk-examples is:issue created:${{ env.last_month }} -reason:"not planned"' | ||
|
||
- name: Create issue | ||
uses: peter-evans/create-issue-from-file@v5 | ||
with: | ||
title: Monthly issue metrics report ${{ env.last_month }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
content-filepath: ./issue_metrics.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Pull Request Stats | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
stats: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Run pull request stats | ||
uses: flowwer-dev/pull-request-stats@master | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
organization: 'piedpiper' | ||
period: 7 | ||
charts: true | ||
disableLinks: true | ||
sortBy: 'COMMENTS' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# Filter out JSON files | ||
filtered_files=() | ||
for file in "$@"; do | ||
if [[ "$file" != *"javascriptv3/"*.json ]]; then | ||
filtered_files+=("$file") | ||
fi | ||
done | ||
|
||
# Run linting only on filtered files | ||
npm run --prefix javascriptv3 ci-lint -- "${filtered_files[@]//javascriptv3\/}" |