openrewrite / openrewrite/rewrite-github-actions

Recipe to update job triggers

Open
#90 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

recipe
Dominant language
Java
Stars
1
Forks
9
Avg merge
5h 27m
Merged PRs (30d)
12

Description

Create a recipe to update the types for which a job can be triggered

Examples :

Input :


name: "My job"

on:
  pull_request:
    types:
      - opened
      - edited
      - synchronize

Remove entry

on:
  pull_request:
    types:
      - opened
      - edited
-      - synchronize

Add entry:

on:
  pull_request:
    types:
      - opened
      - edited
      - synchronize
+    - closed

Add new type:

on:
+  pull_request_review:
+    types: [edited, dismissed]
  pull_request:
    types:
      - opened
      - edited
      - synchronize

As there are many possible options here, we should probably have a generic recipe that accepts a yml expression and replaces the on block with it

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the YAML examples in the issue and inspect existing recipes in this repository to understand how workflow changes are represented. Done means a generic recipe accepts a YAML expression, replaces the workflow's on block accordingly, and covers removing, adding, and introducing trigger types.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, java
Domain
ci-cd, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.