Skip to content

gofair-foundation/qualification-issue-creation-action

Repository files navigation

Qualification Issue Action

GitHub Super-Linter CI

Use this template to bootstrap the creation of a JavaScript action.

Initial Setup

After you've cloned the repository to your local machine or codespace, you'll need to perform some initial setup steps before you can develop your action.

Note

You'll need to have a reasonably modern version of Node.js handy. If you are using a version manager like nodenv or nvm, you can run nodenv install in the root of your repository to install the version specified in package.json. Otherwise, 20.x or later should work!

  1. 🛠️ Install the dependencies

    npm install
  2. 🏗️ Package the JavaScript for distribution

    npm run bundle
  3. ✅ Run the tests

    $ npm test
    
    PASS  ./index.test.js
      ✓ throws invalid number (3ms)
      ✓ wait 500 ms (504ms)
      ✓ test runs (95ms)
    
    ...

Update the Action Metadata

The action.yml file defines metadata about your action, such as input(s) and output(s). For details about this file, see Metadata syntax for GitHub Actions.

When you copy this repository, update action.yml with the name, description, inputs, and outputs for your action.

Update the Action Code

The src/ directory is the heart of your action!

For more information about the GitHub Actions toolkit, see the documentation.

So, what are you waiting for? Go ahead and start customizing your action!

  1. Create a new branch

    git checkout -b releases/v1
  2. Replace the contents of src/ with your action code

  3. Add tests to __tests__/ for your source code

  4. Format, test, and build the action

    npm run all

    [!WARNING]

    This step is important! It will run ncc to build the final JavaScript action code with all dependencies included. If you do not run this step, your action will not work correctly when it is used in a workflow. This step also includes the --license option for ncc, which will create a license file for all of the production node modules used in your project.

  5. Commit your changes

    git add .
    git commit -m "My first action is ready!"
  6. Push them to your repository

    git push -u origin releases/v1
  7. Create a pull request and get feedback on your action

  8. Merge the pull request into the main branch

  9. Create a tag

Your action is now published!


Process flow

flowchart LR
	start((start))-->pp[[PetaPico API request]]
	pp-->rows[/Unqualified FSRs/]-->set
	start-->gh[[GitHub API]]-->iss[/Issues/]-->set
	subgraph "Per row"
    set{Set\ncomparison\nlogic}
    set -->|Already exists|finish
    set -->|Newly unqualified|create
    set -->|Obsolete|close
    set -->|Prematurely closed|reopen
    finish((end))
	  
	  create[["Create GitHub issue"]]-->finish
	  close[["Close GitHub issue"]]-->finish
	  reopen[["Reopen GitHub issue"]]-->finish
	end