Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support push options #327

Closed
seankhliao opened this issue Jun 24, 2023 · 3 comments · Fixed by #341
Closed

support push options #327

seankhliao opened this issue Jun 24, 2023 · 3 comments · Fixed by #341
Labels
enhancement New feature or request

Comments

@seankhliao
Copy link

Is your feature request related to a problem? Please describe.
With git hook support, we can run trigger CI,
but now I want to configure or skip CI sometimes.

Describe the solution you'd like
I'd like to use git push options which are passed through to my git hook.
Eg gitlab supports them: https://docs.gitlab.com/ee/user/project/push_options.html

Describe alternatives you've considered
add directives in the commit message
but that's not a particularly clean way of doing things (ci isn't really part of the change being made).

@aymanbagabas
Copy link
Member

Hi @seankhliao, you could use Soft Serve hooks located in your config directory to integrate git push option into your workflow. You could write a common pre-receive hook in $SOFT_SERVE_DATA_PATH/hooks/pre-receive that uses $GIT_PUSH_OPTION_COUNT and $GIT_PUSH_OPTION_N (N is an integer starting at 0) to parse your git push options. Hooks under $SOFT_SERVE_DATA_PATH/hooks will run for all projects served by Soft Serve.

Let me know if this helps :)

@seankhliao
Copy link
Author

I did try but:

$ git push -v -o ci.skip                                               
Pushing to lucid-git:helloworld
fatal: the receiving end does not support push options
fatal: the remote end hung up unexpectedly

@aymanbagabas aymanbagabas added the enhancement New feature or request label Jun 26, 2023
@aymanbagabas
Copy link
Member

@seankhliao looking more into this, we need to add receive.advertisePushOptions = true to Soft Serve gitconfig

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants