typesafegithub / typesafegithub/github-workflows-kt
[Core feature request] Support operators for type-safe expressions
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 664
- Forks
- 30
- Avg merge
- 4d 19h
- Merged PRs (30d)
- 5
Description
What feature do you need?
https://docs.github.com/en/actions/learn-github-actions/expressions#operators
It would be nice if you could construct more complex expressions using operators with the type-safe expr API.
One way would be to model them as explicit functions like expr { and(always(), success()) } to get ${{ always() && success() }}.
An even nicer way would of course be if operator overloading is used, so that you can actually do expr { always() && success() }} instead.
Those ways also need to support some way of textual input to support not yet supported contexts like step outcome, or matrix values.
Do you have an example usage?
if: always() && (steps.execute_action.outcome == 'success')
Is there a workaround for not having this feature? If yes, please describe it.
Work-around is to not use the type-safe API, but simple strings.
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
Start by reading the type-safe expr API and the linked GitHub Actions expressions operator documentation. Compare the proposed explicit functions, operator overloading, and textual input for unsupported contexts such as step outcomes and matrix values; done means the API can represent the example expression without falling back to plain strings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, kotlin
- Domain
- ci-cd, devops
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100