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

Allow release event #62

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Allow release event #62

wants to merge 2 commits into from

Conversation

sanderv32
Copy link
Contributor

This PR allow to also use the Gogs release event.

Copy link

@yuanhaoliang yuanhaoliang left a comment

Choose a reason for hiding this comment

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

ok

@aamsur-mkt
Copy link

aamsur-mkt commented Oct 3, 2019

Is there any consideration to withhold this PR ?
We are waiting for this.

@sanderv32
Copy link
Contributor Author

@aamsur-mkt I run into some problems with this PR, so need to check what is broken.

Comment on lines +109 to +110
if (!"push".equals(event) && !"release".equals(event)) {
result.setStatus(403, "Only push or release events are accepted.");

Choose a reason for hiding this comment

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

Can the create event be added as well ?
e.g.

if (!"push".equals(event) && !"release".equals(event) && !"create".equals(event)) {
    result.setStatus(403, "Only push, release or create events are accepted.");

Copy link

@huangluyu huangluyu Feb 18, 2020

Choose a reason for hiding this comment

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

Can the pull_request event be added as well ?
e.g.

if (!"push".equals(event) && !"release".equals(event) && !"create".equals(event) && !"pull_request".equals(event)) {
    result.setStatus(403, "Only push, release, create or pull_request events are accepted.");

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same here as the above comment. Adding other events breaks things at the moment. Need to investigate how to fix this.

Copy link

Choose a reason for hiding this comment

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

@sanderv32 very interested in this work being completed and merged. Is there something I can contribute to help?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The whole thing broke down with this changes. Haven't looked for a long time at this change, but if you want to test please do so.

TheHardGamer added a commit to TheHardGamer/gogs-webhook-plugin that referenced this pull request Aug 31, 2022
Release events support was partially added in jenkinsci#62 but since its payload doesn't contain certain things, it was failing with return status being
{"result":"ERROR","message":"net.sf.json.JSONException: JSONObject[\"commits\"] is not a JSONArray."}
TheHardGamer added a commit to TheHardGamer/gogs-webhook-plugin that referenced this pull request Aug 31, 2022
Release events support was partially added in jenkinsci#62 but since its payload doesn't contain certain things, it was failing with return status being
{"result":"ERROR","message":"net.sf.json.JSONException: JSONObject[\"commits\"] is not a JSONArray."}
TheHardGamer added a commit to TheHardGamer/gogs-webhook-plugin that referenced this pull request Aug 31, 2022
Release events support was partially added in jenkinsci#62 but since its payload doesn't contain certain things, it was failing with return status being
{"result":"ERROR","message":"net.sf.json.JSONException: JSONObject[\"commits\"] is not a JSONArray."}
TheHardGamer added a commit to TheHardGamer/gogs-webhook-plugin that referenced this pull request Aug 31, 2022
Release events support was partially added in jenkinsci#62 but since its payload doesn't contain certain things, it was failing with return status being
{"result":"ERROR","message":"net.sf.json.JSONException: JSONObject[\"commits\"] is not a JSONArray."}
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

6 participants