trevinhofmann / eleventh

A simple JavaScript logger for writing messages to the standard output, written in TypeScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect Event Trigger for Lint Workflow

SunnySoftwareADAM opened this issue · comments

The lint workflow is triggered by the "pull_request" event. However, in GitHub Actions, the pull_request event refers to a number of types of pull_request-related activity. It’s generally considered best practice to specify the types of pull_request events that should trigger the workflow, to avoid unnecessary runs. For example, types: [opened, synchronize, reopened] could be used to trigger the lint job only when a pull request is opened, updated, or reopened.

The current configuration may lead to unnecessary workflow runs, such as when a pull request is labeled or assigned, which typically wouldn’t require linting since no code has changed.

To address this issue, the trigger should be changed to:

on:
  pull_request:
    types: [opened, synchronize, reopened]

This will ensure that the lint action is only run for relevant changes to the pull request.