Skip to content

lauravuo/fetch-contributors-action

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
 
 
 
 
 
 
 
 
 
 
 
 
 
 

typescript-action status

Fetch Organisation Contributors action

This action fetches the contributors for each repository of the GitHub organisation. It creates a markdown file and stores it to the repository.

See example of the result file.

Inputs

token

Required GitHub API token

organisation

The GitHub organisation name. Default is the repository owner.

commitTarget

Whether to commit the result file to the repository. Default is true.

targetPath

Result markdown file path. Default is ./contributors.md.

Example usage

uses: lauravuo/fetch-contributors-action@v0.2
with:
  token: ${{ secrets.GITHUB_TOKEN }}

Scheduling

You can schedule the action for example to run every night:

name: 'update'
on:
  workflow_dispatch:
  schedule:
    - cron: "0 0 * * *" # Runs at 00:00
jobs:
  update:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: lauravuo/fetch-contributors-action@v0.2
        with:
          token: ${{ secrets.GITHUB_TOKEN }}

Development

First, you'll need to have a reasonably modern version of node handy. This won't work with versions older than 9, for instance.

Install the dependencies

npm install

Build the typescript and package it for distribution

npm run build && npm run package

Run the tests ✔️

npm test