feat: validate --directory alternative to --repository to not clone #1008

Merged
earl-warren merged 1 commit from earl-warren/runner:wip-validate-repository into main 2025-09-17 16:40:31 +00:00
Contributor

Resolves forgejo/forgejo-actions-feature-requests#51


Note to reviewers: while working on fixing the exit status of the validate command, a border case was discovered when using --clonedir . --repository . by which it will not find an action.yml file at the root of the directory. It will be easier to fix and test using a --directory option designed to use a pre-existing directory instead because it is not a border case but the most common case really.

  • features
    • PR: feat: validate --directory alternative to --repository to not clone
Resolves forgejo/forgejo-actions-feature-requests#51 --- Note to reviewers: while working on fixing the exit status of the validate command, a border case was discovered when using `--clonedir . --repository .` by which it will not find an `action.yml` file at the root of the directory. It will be easier to fix and test using a `--directory` option designed to use a pre-existing directory instead because it is not a border case but the most common case really. <!--start release-notes-assistant--> <!--URL:https://code.forgejo.org/forgejo/runner--> - features - [PR](https://code.forgejo.org/forgejo/runner/pulls/1008): <!--number 1008 --><!--line 0 --><!--description ZmVhdDogdmFsaWRhdGUgLS1kaXJlY3RvcnkgYWx0ZXJuYXRpdmUgdG8gLS1yZXBvc2l0b3J5IHRvIG5vdCBjbG9uZQ==-->feat: validate --directory alternative to --repository to not clone<!--description--> <!--end release-notes-assistant-->
mfenniak approved these changes 2025-09-17 15:09:56 +00:00
mfenniak left a comment

LGTM

LGTM
@ -190,1 +205,4 @@
validateCmd.MarkFlagsOneRequired("repository", "path", "directory")
validateCmd.MarkFlagsMutuallyExclusive("repository", "path")
validateCmd.MarkFlagsMutuallyExclusive("directory", "repository")
validateCmd.MarkFlagsMutuallyExclusive("directory", "clonedir")
Owner

It seems like there might be a mutually exclusive option missing -- "path" & "directory"?

It seems like there might be a mutually exclusive option missing -- `"path"` & `"directory"`?
Author
Contributor

Good catch.

Good catch.
earl-warren marked this conversation as resolved
earl-warren force-pushed wip-validate-repository from 061a06b01f
All checks were successful
cascade / forgejo (pull_request_target) Has been skipped
cascade / debug (pull_request_target) Has been skipped
cascade / end-to-end (pull_request_target) Has been skipped
issue-labels / release-notes (pull_request_target) Successful in 8s
checks / validate mocks (pull_request) Successful in 53s
checks / build and test (pull_request) Successful in 2m47s
checks / runner exec tests (pull_request) Successful in 24s
/ example-lxc-systemd (pull_request) Successful in 6m33s
checks / runner integration tests (pull_request) Successful in 4m26s
checks / integration tests (pull_request) Successful in 10m16s
to 80ac66e10c
All checks were successful
issue-labels / release-notes (pull_request_target) Successful in 4s
checks / validate mocks (pull_request) Successful in 48s
checks / build and test (pull_request) Successful in 2m37s
checks / runner exec tests (pull_request) Successful in 24s
checks / runner integration tests (pull_request) Successful in 4m19s
checks / integration tests (pull_request) Successful in 10m41s
cascade / debug (pull_request_target) Has been skipped
cascade / end-to-end (pull_request_target) Successful in 4s
cascade / forgejo (pull_request_target) Successful in 1m49s
2025-09-17 16:29:45 +00:00
Compare
earl-warren scheduled this pull request to auto merge when all checks succeed 2025-09-17 16:32:03 +00:00
earl-warren deleted branch wip-validate-repository 2025-09-17 16:40:31 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
forgejo/runner!1008
No description provided.