Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
check-square

GitHub Action

Gherking extractor for GitHub Issues

v0.0.1 Pre-release

Gherking extractor for GitHub Issues

check-square

Gherking extractor for GitHub Issues

GitHub Action that processes Gherkin content from issues and turn them into a content that can be then saved into a file

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Gherking extractor for GitHub Issues

uses: bcgov-nr/action-gherkin-issue-processor@v0.0.1

Learn more about this action in bcgov-nr/action-gherkin-issue-processor

Choose a version

Issues Pull Requests Apache 2.0 License Lifecycle

Gherkin feature extractor from GitHub issues

GitHub Action that processes Gherkin content from issues and turn them into a content that can be then saved into a file.

It reads the issues from a repository and extracts the Gherkin content from them. The Gherkin content is then saved into a file. This expects the issue to contains a Gherkin content in the body of the issue, like the following:

Feature: As a user, I want to be able to login to the system

  Scenario: User can login with valid credentials
    Given the user is on the login page
    When the user enters valid credentials
    Then the user is logged in

The action will extract the Gherkin content from the issue and provide it as a parameter. You can then save as a feature file.

Usage

- uses: bcgov-nr/action-gherkin-issue-processor@main
  with:
    ### Required

    # Issue number
    issue: 1

    # Target repository owner
    owner: bcgov-nr

    # Target repository name
    repo: bcgov-nr/action-gherkin-issue-processor

Example, Current Repository

Runs when an issue is created. Extracts the Gherkin content from the issue and saves it to a file.

on:
  issues:
    types:
      - opened
jobs:
  feature:
    name: Extract feature content
    runs-on: ubuntu-latest
    steps:
      - name: Extract feature content
        id: feature
        uses: bcgov-nr/action-gherkin-issue-processor.yml@main
        with:
          issue: ${{ github.event.issue.number }}
      - name: Save feature content
        run: echo "${{ steps.feature.outputs.feature }}" > feature.feature

Example, Current Repository but more verbose

Runs when an issue is created. Extracts the Gherkin content from the issue and saves it to a file.

on:
  issues:
    types:
      - opened
jobs:
  feature:
    name: Extract feature content
    runs-on: ubuntu-latest
    steps:
      - name: Extract feature content
        id: feature
        uses: bcgov-nr/action-gherkin-issue-processor.yml@main
        with:
          issue: ${{ github.event.issue.number }}
          owner: ${{ github.repository_owner }}
          repo: ${{ github.repository }}
      - name: Save feature content
        run: echo "${{ steps.feature.outputs.feature }}" > feature.feature

Feedback

Please contribute your ideas! Issues and pull requests are appreciated.