-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
export pusher name ENV variable #316 #317
Conversation
Is there a document about available env variables that should be updated too ? |
@@ -256,6 +256,8 @@ func runServ(c *cli.Context) error { | |||
} | |||
} | |||
|
|||
os.Setenv("pusherName", user.Name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know the uuid is not done like that, but normally env variables are uppercase separated by underscores
The scope of these vars is so limited that I don't think we need to prefix them |
Does not hurt to prefix either
LGTM
|
@strk For what it's worth, I agree with you. 👍 |
@tboerger I agree with the others. The scope may be limited now, but they might expand in the future so might as well prefix them from the get-go. |
@afdev82 Please note that Gitea also shoots git-hooks for pushes over HTTP, add the variable in the approriate place for that as well ;) |
Than we should also rename the uuid env variable and note that as a minor breaking change |
@bkcsoft Ok, first I have to figure out where :P |
I'm ok with that. |
LGTM - and no problem for me to put in 1.0.0 |
We should also export GITEA_UUID but keep the old env variable for backward compatibility |
Beside my above comment LGTM |
Currently I'm still working on it, to export the other variable too and to test if I have actually the env variables, maybe I'm testing it in the wrong way. Could someone confirm that the variable is exported? |
I'm still thinking about the old |
@tboerger I've kept depricated API endpoints in my fixes and just added a note, and IMO that is good practice (keeping depricated things for a few minors) About that, does anyone know where |
@afdev82 I say keep the old value in-case someone uses it, but change the usage in |
@afdev82 would you search for the uuid usage and replace it there as well? Than nobody else needs to do that and we can merge the PR. |
Export Pusher name as GITEA_PUSHER_NAME env variable Export also GITEA_UUID, but keep the uuid env variable for backward compatibility export pusher name ENV variable #316 change env variable prefix to GITEA_ Signed-off-by: Antonio Facciolo <afdev82@gmail.com> Export also GITEA_UUID #316 Keep uuid env variable for backward compatibility
@tboerger that it now fixed LGTM |
This change will export the name of the pusher as an environment variable in order to use it in custom hooks.