-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from nicklegan/version1.0.1
v1.0.1
- Loading branch information
Showing
8 changed files
with
186 additions
and
153 deletions.
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# GitHub Organization Code Frequency Action | ||
# GitHub Organization Code Frequency Report Action | ||
|
||
> A GitHub Action to generate a report that contains code frequency metrics and programming languages used per repository belonging to a GitHub organization. | ||
|
@@ -10,6 +10,15 @@ The example [workflow](https://docs.github.com/en/actions/reference/workflow-syn | |
name: Code Frequency Action | ||
|
||
on: | ||
schedule: | ||
# Runs on the first day of the month at 00:00 UTC | ||
# | ||
# ┌────────────── minute | ||
# │ ┌──────────── hour | ||
# │ │ ┌────────── day (month) | ||
# │ │ │ ┌──────── month | ||
# │ │ │ │ ┌────── day (week) | ||
- cron: '0 0 1 * *' | ||
workflow_dispatch: | ||
inputs: | ||
fromdate: | ||
|
@@ -18,8 +27,6 @@ on: | |
todate: | ||
description: 'Optional interval end date (format: yyyy-mm-dd)' | ||
required: false # Skipped if workflow dispatch input is not provided | ||
schedule: | ||
- cron: '0 0 1 * *' # Runs on the first day of the month at 00:00 | ||
|
||
jobs: | ||
code-frequency-report: | ||
|
@@ -30,7 +37,7 @@ jobs: | |
uses: actions/checkout@v2 | ||
|
||
- name: Get Git audit-log | ||
uses: nicklegan/[email protected].0 | ||
uses: nicklegan/[email protected].1 | ||
with: | ||
token: ${{ secrets.ORG_TOKEN }} | ||
fromdate: ${{ github.event.inputs.fromdate }} # Used for workflow dispatch input | ||
|
@@ -73,7 +80,7 @@ If the below fields are left empty during [workflow dispatch input](https://gith | |
|
||
## CSV layout | ||
|
||
The results of the 2nd and 3rd report column will be the sum of code frequency date for the requested interval per organization repository. | ||
The results of the 2nd and 3rd report column will be the sum of code frequency date for the selected interval per organization repository. | ||
|
||
| Column | Description | | ||
| :----------------------- | :-------------------------------------------------- | | ||
|
@@ -88,8 +95,14 @@ The results of the 2nd and 3rd report column will be the sum of code frequency d | |
|
||
A CSV report file to be saved in the repository `reports` folder using the following naming format: `organization-date-interval.csv`. | ||
|
||
## GitHub App installation authentication | ||
## GitHub App authentication | ||
|
||
In some scenarios it might be preferred to authenthicate as a [GitHub App](https://docs.github.com/developers/apps/getting-started-with-apps/about-apps) rather than using a [personal access token](https://docs.github.com/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token). | ||
|
||
The following features could be a benefit authenticating as a GitHub App installation: | ||
|
||
For large enterprise organizations to avoid hitting the 5000 requests per hour authenticated GitHub API rate limit, [authenticating as a GitHub App installation](https://docs.github.com/developers/apps/building-github-apps/authenticating-with-github-apps#authenticating-as-an-installation) instead would increase the [API request limit](https://docs.github.com/developers/apps/building-github-apps/rate-limits-for-github-apps#github-enterprise-cloud-server-to-server-rate-limits) in comparison to using a personal access token. | ||
- The GitHub App is directly installed on the organization, no separate user account is required. | ||
- A GitHub App has more granular permissions than a personal access token. | ||
- To avoid hitting the 5000 requests per hour GitHub API rate limit, [authenticating as a GitHub App installation](https://docs.github.com/developers/apps/building-github-apps/authenticating-with-github-apps#authenticating-as-an-installation) would increase the [API request limit](https://docs.github.com/developers/apps/building-github-apps/rate-limits-for-github-apps#github-enterprise-cloud-server-to-server-rate-limits). | ||
|
||
The authentication strategy can be integrated with the Octokit library by installing and configuring the [@octokit/auth-app](https://github.com/octokit/auth-app.js/#usage-with-octokit) npm module and [rebuild](https://docs.github.com/actions/creating-actions/creating-a-javascript-action) the Action in a separate repository. | ||
The GitHub App authentication strategy can be integrated with the Octokit library by installing and configuring the [@octokit/auth-app](https://github.com/octokit/auth-app.js/#usage-with-octokit) npm module before [rebuilding](https://docs.github.com/actions/creating-actions/creating-a-javascript-action) the Action in a separate repository. |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
Oops, something went wrong.