/pull_request_status_action

A Github Action that creates a Status for the Pull Request.

Primary LanguagePythonMIT LicenseMIT

Pull Request Status Action

CircleCI GitHub marketplace

A Github Action that creates a Status for the Pull Request.

Usage

jobs:
  update-pr-status:
    runs-on: ubuntu-latest
    steps:
    - name: Set PR Status to pending
        uses: niteoweb/pull_request_status_action@v1.0.0
        with:
          # Pull Request number (Mandatory)
          pr_number: 32

          # State to apply (Mandatory)
          # Any of the (error | failure | pending | success) states
          state: pending

          # Name of the repository in {organization}/{repo_name} format (Mandatory)
          repository: niteoweb/the-awesome-repo

          # Name to identify the Status (Optional)
          # Defaults to `default`
          context: default

          # The target URL to associate with the Status (Optional)
          # This URL will be linked from the Github UI to allow users to easily see the source of the status.
          target_url: https://example.target_url.com

          # A short description of the status (Optional)
          description: "An example description"

        env:
          # Default Github Token
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

GITHUB_TOKEN is required to communicate with Github Deployment API. Default token provided by Github can be used.

Local Development

  • Create a Python virtual environment(version > 3.6).
  • Activate the environment.
  • Install the development dependencies:
    pip install -r requirements-dev.txt
  • Make changes.
  • Test the changes:
    make tests
  • Make sure that coverage is 100%.