enable forgejo-runner validate to run on files in repository without cloning it #51
Labels
No labels
Stage
Idea
Stage
Ready
No milestone
No assignees
2 participants
Notifications
Due date
No due date set.
Reference
forgejo/forgejo-actions-feature-requests#51
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
How to use this feature request
First hand experience
pre-commithook forforgejo-runner.forgejo-runner validate --repositorymakes a clone of the repository and validates that, which obviously doesn’t include not-yet-committed files or changes to filesforgejo-runner validate --pathNeeds and benefits
Not being able to test the uncommitted status of a repository without specifying individual files by hand makes it hard to implement a
pre-commithook (or even manually make a git or other VCS pre-commit hook) since we’d want to test it before it enters the repository, not after.Feature Description
A flag (
--local?) to validate^(\.(forgejo|github|gitea)/workflows/[^/]+|action)\.ya?ml$files in the current directory, regardless of whether they’ve been committed or not, and without having to specify each file.Alternatively(/additionally?), let
--pathtake multiple arguments and let it decide whether to validate as action or workflow files based on their paths/filenames (if--actionor--workflowis not explicitly given).What needs to happen before a feature request is ready to be implemented?
Users can complete the first step (accumulating first and experience) on their own, even if this feature request did not catch the eye of someone with the necessary skills to implement it. And when it reaches that point, it will stand out and have a much higher chance of being implemented.
To fully grasp the scope of a feature request, and to brainstorm possible solutions, a feature request will generally wait until several users have provided their perspective.
Thumbs-up reactions help gauge popularity, but do not provide the same amount of useful information.
Results from discussions and additional user experiences are incorporated into a final summary to provide a single reference for the developers working on this change.
This can be done by the author of the issue or anyone else in a followup comment.
Stage/Ideais changed toStage/Ready.Depending on the feature request it can be in Forgejo, Forgejo runner or Forgejo ACT.
A copy/paste of the "Needs and benefit" and "Feature description" should be used, with link to this issue so the developer knows where to find more details if they need to.
This is a compelling use case.
I think the
--clonediroption does what you need.That does indeed seem to work! But it feels quite hacky. 😆
But at least it unblocks forgejo/runner#1002 and lets me return to that. 🫡
Agreed. When diving in the implementation it is actually straightforward but it feels hacky from the CLI. The solution would be to never clone when it is a directory. But then it would require writing tests using URLs for the sake of getting coverage and this is a little more work.
Feel free to convert this feature request into doing that. Or close it. It is a border case that probably does not deserve the effort. But it may just me being lazy.
earl-warren referenced this issue from forgejo/runner2025-09-17 11:03:51 +00:00