Skip to content

A GitHub Action that selects a number of repository collaborators at random from your repository's collaborators list.

License

Notifications You must be signed in to change notification settings

amazing-actions/selected-collaborators

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

selected-collaborators

GitHub release (latest SemVer) GitHub GitHub issues

A GitHub Action that selects a number of repository collaborators at random from your repository's collaborators list.

Inputs

Input Description Default
token Required. The GitHub token to use to retrieve repository information. N/A
limit_number The number of collaborators to select at random. 1
separator The separator will be used to separate candidates. ","

Outputs

Output Description
candidates An array of the selected collaborator usernames.
candidates_string A separated(default: comma) string of the selected collaborator usernames.
at_candidates_string A comma-separated string of the selected collaborator usernames with an @ symbol prefix.

Example usage

- name: Select random repository collaborators
  uses: amazing-actions/[email protected]
  id: select-collaborators
  with:
    limit_number: 3
    token: ${{ secrets.GITHUB_TOKEN }}

- name: Use selected collaborators
  run: |
    echo "Selected collaborators: ${{ steps.select-collaborators.outputs.candidates_string }}"
    echo "Selected collaborators with '@' prefix: ${{ steps.select-collaborators.outputs.at_candidates_string }}"

About

A GitHub Action that selects a number of repository collaborators at random from your repository's collaborators list.

Topics

Resources

License

Stars

Watchers

Forks