Skip to content

minuth/report-action

Use this GitHub Action with your project

Add this Action to an existing workflow or create a new one.

View on Marketplace
main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Report Action

This GitHub Action allows you to retrieve various statistics about a GitHub repository, including:

  • Total open issues
  • Total closed issues
  • Total open pull requests
  • Total closed pull requests
  • Total merged pull requests
  • Total collaborators
  • Total watchers
  • Total forks
  • Total stargazers

This action was built specifically as a utility action. It is recommended that you use it as a composite action to follow best practices for GitHub Actions. See below example for detailed usage.

Inputs

repository [optional]

Repository name with owner. For example, minuth/report-action

token [optional]

Personal access token (PAT) used to fetch the repository.

Outputs

report

The report result in json format:

{
  "repository": {
    "openIssues": { "totalCount": 1 },
    "closedIssues": { "totalCount": 1 },
    "openPullRequest": { "totalCount": 5 },
    "closedPullRequest": { "totalCount": 2 },
    "mergedPullRequest": { "totalCount": 4 },
    "collaborators": { "totalCount": 1 },
    "watchers": { "totalCount": 1 },
    "forks": { "totalCount": 0 },
    "stargazers": { "totalCount": 0 }
  }
}

Example

In this below example we will use report-action to create a composite action.

runs:
  using: 'composite'
  steps:
    - uses: minuth/report-action@v1
      id: report_action
    - run: node ./dist/index.js ${{steps.report_action.outputs.report}}

In this case, the first step uses the minuth/report-action@v1 action to get the report and the second step runs a node script (Javascript action) that passes the report (output of the first step) as an argument. So the Javascript action can use the report argument the do anything in code.

This action can be used in the workflow like other actions.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published