Skip to content
This repository was archived by the owner on Jan 7, 2021. It is now read-only.

Conversation

@tommywo
Copy link

@tommywo tommywo commented Jul 30, 2018

No description provided.

@t-8ch
Copy link
Contributor

t-8ch commented Jul 30, 2018

Hi @tommywo,

thanks for this! Can you remove remove the three irrelevant commits from your PR?

@tommywo
Copy link
Author

tommywo commented Aug 1, 2018

Hi @t-8ch.
I've removed irrelevant commits.
Do you think that behaviour should be controlled by a flag?

}


public String getUserSlug() {
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems unused.

return credentials.getLogin();
}


Copy link
Contributor

Choose a reason for hiding this comment

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

This PR seems to use two blank lines between functions, while the existing code only uses one.

}
}


Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this blank line


put(request,
json,
MessageFormat.format(PULL_REQUEST_APPROVAL_POST_ERROR_MESSAGE, pr.repository(), pr.pullRequestId()));
Copy link
Contributor

Choose a reason for hiding this comment

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

A custom error message would be better.

pr.pullRequestId(),
credentials.getUserSlug());
JsonObject json = new JsonObject();
json.put("status","NEEDS_WORK");
Copy link
Contributor

Choose a reason for hiding this comment

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

Needs a space after ,.

@t-8ch
Copy link
Contributor

t-8ch commented Aug 3, 2018

@tommywo I still have a few minor nit-picks.
A setting to switch between the current behaviour and the new stuff is probably the right way forward.

@t-8ch
Copy link
Contributor

t-8ch commented Oct 15, 2018

@tommywo Thanks!

Please squash the commits into one.

As approving/un-approving and approving/"needs work" are mutually exclusive I propose to merge the setting into sonar.stash.reviewer.approval. We could have a special value of sonar.stash.reviewer.approval=needswork to activate the new logic.

I admit the naming is a little bit unintuitive but we

  1. Keep compat to the existing setting
  2. Expose the tri-state setting directly of the user

What do you think?

@tommywo
Copy link
Author

tommywo commented Oct 16, 2018

How about defining sonar.stash.reviwer.behavior with values approve/disappove approve/needs_work, none and keepingsonar.stash.reviewer.approval with deprecation warning?

@t-8ch
Copy link
Contributor

t-8ch commented Oct 16, 2018

To be honest I would prefer not introduce a deprecation warning and force users to change their working configuration. Should we release a incompatible version 2.0 in the future we could change the setting name.

@t-8ch
Copy link
Contributor

t-8ch commented Oct 16, 2018

Reopening to restart tests

@t-8ch t-8ch closed this Oct 16, 2018
@t-8ch t-8ch reopened this Oct 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants