Skip to content

rustacean-sh/rustacean-authorship-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rustacean.sh Authorship Action

Action to verify Rustacean Authenticity on PRs modifying a Rustacean file.

Motivation

Provide an automated way to verify the authenticity of a Rustacean file in a PR. This is achieved by checking the authorship of the file and comparing it to the PR author.

This Action leverages the GitHub API and the GitHub Actions Context to verify the authenticity of the Rustacean file.

Development

For convenience a mock server is provided which is used to simulate the GitHub API.

Run the following command to start the server:

cargo r --bin mock

The server listens on port 3000 by default.

Run the following command on development mode:

GITHUB_BASE_URL="http://localhost:3000/repos/rustacean-sh/rustacean.sh" \
cargo r --bin rustacean-authorship-action -- \
--pr-number <PR Number to Verify> \
--pr-author <PR Author GitHub's Username> \
--github-token <GitHub Token>

Static assets on the mock server are located at ./fixtures, you can modify them to test different scenarios. Default values are: --pr-number 22 --pr-author EstebanBorai --github-token 1234

License

This project is licensed under the MIT license.

About

Rustacean Authorship Action

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •