openrewrite / openrewrite/rewrite-github-actions
Replace usage of arrays when there is a single item in the dependency list
Open
Nobody has claimed this yet.
enhancement
recipe
- Dominant language
- Java
- Stars
- 1
- Forks
- 9
- Avg merge
- 5h 27m
- Merged PRs (30d)
- 12
Description
What problem are you trying to solve?
Improve readability of the workflow
What precondition(s) should be checked before applying this recipe?
There is one single item within the needs block and an array is used
The recipe should not be applied if there are multiple entries
docker-build:
needs: [ maven, slack ]
uses: ...
Describe the situation before applying the recipe
docker-build:
needs: [ maven ]
uses: ...
Describe the situation after applying the recipe
docker-build:
needs: maven
uses: ...
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the recipe entry point for GitHub Actions job dependencies and use the issue's before-and-after YAML as the starting test fixture. Verify that a singleton needs array becomes a scalar value, while arrays with multiple entries remain unchanged; add or update recipe tests to cover both cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, java
- Domain
- ci-cd
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100