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

feat: allow to run receive with github enterprise #1579

Closed
wants to merge 2 commits into from

Conversation

KnisterPeter
Copy link
Contributor

This will add the option --host to the probot-receive script.
It allows to execute it against github enterprise instances.

@KnisterPeter KnisterPeter requested a review from a team as a code owner July 22, 2021 07:54
This will add the option `--host` to the probot-receive script.
It allows to execute it against github enterprise instances.
Copy link
Contributor

@gr2m gr2m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a test and update the documentation please?

@KnisterPeter
Copy link
Contributor Author

@gr2m Do you have an example (or an idea/suggestion) on how to test the bin scripts? There is no test for that in the repository currently.

@gr2m
Copy link
Contributor

gr2m commented Aug 2, 2021

There is no test for that in the repository currently.

apologies, I thought there was. I'll have a look and get back to you

@gr2m
Copy link
Contributor

gr2m commented Aug 2, 2021

I would add a test to https://github.com/probot/probot/blob/master/test/e2e/e2e.test.ts. You can spawn the probot receive command as we do here

probotProcess = execa(
"bin/probot.js",
["run", "./test/e2e/hello-world.js"],
{
env: {
APP_ID: "1",
PRIVATE_KEY:
"-----BEGIN RSA PRIVATE KEY-----\nMIIBOQIBAAJBAIILhiN9IFpaE0pUXsesuuoaj6eeDiAqCiE49WB1tMB8ZMhC37kY\nFl52NUYbUxb7JEf6pH5H9vqw1Wp69u78XeUCAwEAAQJAb88urnaXiXdmnIK71tuo\n/TyHBKt9I6Rhfzz0o9Gv7coL7a537FVDvV5UCARXHJMF41tKwj+zlt9EEUw7a1HY\nwQIhAL4F/VHWSPHeTgXYf4EaX2OlpSOk/n7lsFtL/6bWRzRVAiEArzJs2vopJitv\nA1yBjz3q2nX+zthk+GLXrJQkYOnIk1ECIHfeFV8TWm5gej1LxZquBTA5pINoqDVq\nNKZSuZEHqGEFAiB6EDrxkovq8SYGhIQsJeqkTMO8n94xhMRZlFmIQDokEQIgAq5U\nr1UQNnUExRh7ZT0kFbMfO9jKYZVlQdCL9Dn93vo=\n-----END RSA PRIVATE KEY-----",
WEBHOOK_SECRET: "test",
PORT: String(probotPort),
GHE_HOST: `127.0.0.1:${mockServerPort}`,
GHE_PROTOCOL: "http",
LOG_LEVEL: "trace",
},
}
);

Note that you have to run npm run build if you edit any of the src/ files as the command will run the build version of the code

Can you give that a try?

@AaronDewes
Copy link
Member

This has been implemented by #1719.

@AaronDewes AaronDewes closed this Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants