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

Feature: Execute scripts on events #2221

Closed
sinnlosername opened this issue Jul 27, 2017 · 9 comments
Closed

Feature: Execute scripts on events #2221

sinnlosername opened this issue Jul 27, 2017 · 9 comments
Labels
reviewed/wontfix The problem described in this issue/fixed in this pull request is not a problem we will fix

Comments

@sinnlosername
Copy link
Contributor

Could you add a feature to execute shell scripts on specific events.

Examples what I mean with events:

  • Something is pushed into a repo
  • A pull request was accept
  • An issue was created/closed
  • ...

The feature would be helpful as users could add their own features like notifications, automated emails, etc....

@jonasfranz
Copy link
Member

You could use Webhooks for this. You could write for example an easy PHP script which executes your custom features and which is called by the webhook.

@jonasfranz
Copy link
Member

Or you could use git hooks (https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks) for some specific events.

@sinnlosername
Copy link
Contributor Author

Yes, but I think it would be easier to do it with shell scripts, as most features require shell commands and you won't have problems with permissions.

Git hooks are clientside, aren't they

@jonasfranz
Copy link
Member

jonasfranz commented Jul 27, 2017

No, git hooks can be server side too.

https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks#_server_side_hooks

You could find this in your repository settings under "Git-Hooks".

@sinnlosername
Copy link
Contributor Author

Events on push work with it, but issue listener or something like that aren't possible, are they?

@lunny lunny added the reviewed/wontfix The problem described in this issue/fixed in this pull request is not a problem we will fix label Jul 28, 2017
@lunny
Copy link
Member

lunny commented Jul 28, 2017

As @JonasFranzDEV said, you could use webhook do that or you can edit custom git hooks on repository settings. I think that's enough for most things.

@sinnlosername
Copy link
Contributor Author

Why don't you just copy webhooks and execute a shell script with all of it?

@sapk
Copy link
Member

sapk commented Jul 28, 2017

This could be a good first example/implementation for #2222 with a plugin listening on event and executing a list of shell script.

@3shirtlessmen
Copy link

I do exactly these things with server side githooks. I use a mix of shell / python scripts to accomplish what I want.

@lunny lunny closed this as completed May 17, 2018
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
reviewed/wontfix The problem described in this issue/fixed in this pull request is not a problem we will fix
Projects
None yet
Development

No branches or pull requests

5 participants