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

#717 Started implementing GitlabIssues. #718

Merged
merged 2 commits into from
Nov 27, 2020
Merged

Conversation

criske
Copy link
Contributor

@criske criske commented Nov 26, 2020

closes #717

@charlesmike
Copy link

@criske thank you for your Pull Request. I'll assign someone to review it soon.

@@ -210,15 +209,12 @@ public double percentage() {

@Override
public BigDecimal commission(final BigDecimal value) {
final double twoDigitsPercentage = Double.valueOf(
new DecimalFormat("0.00").format(this.percentage)
Copy link
Contributor Author

@criske criske Nov 26, 2020

Choose a reason for hiding this comment

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

@amihaiemil On my end the test for this part was failling with
java.lang.NumberFormatException: For input string: "8,00" due to using comma separator imposed by Locale, most likely. So I've changed it to use BigDecimals only.

@charlesmike
Copy link

@amihaiemil please review this Pull Request. Deadline (when it should be merged or closed) is 2020-11-29T10:51:51.799504.

You should check if the requirements have been implemented (partially or in full), if there are unit tests covering the changes and if the CI build passes. Feel free to reject the PR or ask for changes if it's too big or not clear enough.

Estimation here is 30 minutes, that's how much you will be paid. You will be paid even if this PR gets rejected.

return this.json
.getJsonObject("references")
.getString("full")
.split("[#!]")[0];
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@amihaiemil we're using a regexed split cause
Issue json is using #

"references": {
    "short": "#1",
    "relative": "#1",
    "full": "my-group/my-project#1"
  }

Pull request (merge request) is using !

"references": {
    "short": "!1",
    "relative": "!1",
    "full": "my-group/my-project!1"
  }


@Override
public String issueId() {
return String.valueOf(this.json.getInt("iid"));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've opted for iid (relative id to project) insted of id (global id) because Issues and Pull Requests are using iid in their url:
GET /projects/:id/issues/:issue_iid
GET /projects/:id/merge_requests/:merge_request_iid

- fixed test coverage for GitlabIssue.
@amihaiemil
Copy link
Member

@rultor merge it please

@rultor
Copy link
Collaborator

rultor commented Nov 27, 2020

@rultor merge it please

@amihaiemil OK, I'll try to merge now. You can check the progress of the merge here

@rultor
Copy link
Collaborator

rultor commented Nov 27, 2020

@rultor merge it please

@amihaiemil @criske Oops, I failed. You can see the full log here (spent 3min)

+ set -e
+ set -o pipefail
++ dirname ./run.sh
+ cd .
+ echo 27283
+ echo '1.69.1 839260fab'
1.69.1 839260fab
+ date
Fri Nov 27 09:30:52 CET 2020
+ uptime
 09:30:52 up 60 days, 18:36,  0 users,  load average: 0.06, 0.01, 0.00
+ ff=default
+ image=g4s8/rultor-jdk11:alpine3.10
+ rebase=false
+ head_branch=master
+ pull_title='#717 Started implementing GitlabIssues.'
+ author=amihaiemil
+ directory=
+ head=git@github.com:self-xdsd/self-core.git
+ pull_id=718
+ fork=git@github.com:criske/self-core.git
+ fork_branch=issue717
+ squash=false
+ vars=('--env=JAVA_HOME=/usr/lib/jvm/java-11-openjdk' '--env=head=git@github.com:self-xdsd/self-core.git' '--env=pull_id=718' '--env=fork=git@github.com:criske/self-core.git' '--env=fork_branch=issue717' '--env=head_branch=master' '--env=pull_title=#717 Started implementing GitlabIssues.' '--env=author=amihaiemil' '--env=scripts=( '\''export '\''\'\'''\''JAVA_HOME=/usr/lib/jvm/java-11-openjdk'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''head=git@github.com:self-xdsd/self-core.git'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''pull_id=718'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''fork=git@github.com:criske/self-core.git'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''fork_branch=issue717'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''head_branch=master'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''pull_title=#717 Started implementing GitlabIssues.'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''author=amihaiemil'\''\'\'''\'''\'' '\'';'\'' '\''mvn clean install -Pcheckstyle,itcases'\'' '\'';'\'' )')
+ scripts=('export '\''JAVA_HOME=/usr/lib/jvm/java-11-openjdk'\''' ';' 'export '\''head=git@github.com:self-xdsd/self-core.git'\''' ';' 'export '\''pull_id=718'\''' ';' 'export '\''fork=git@github.com:criske/self-core.git'\''' ';' 'export '\''fork_branch=issue717'\''' ';' 'export '\''head_branch=master'\''' ';' 'export '\''pull_title=#717 Started implementing GitlabIssues.'\''' ';' 'export '\''author=amihaiemil'\''' ';' 'mvn clean install -Pcheckstyle,itcases' ';')
+ container=self-xdsd_self-core_718
+ as_root=false
+ mkdir -p /home/rultor/.ssh
+ echo -e 'Host github.com\n\tStrictHostKeyChecking no\n'
+ chmod 600 /home/rultor/.ssh/config
+ git clone git@github.com:self-xdsd/self-core.git repo
Cloning into 'repo'...
+ cd repo
+ git config user.email me@rultor.com
+ git config user.name rultor
+ '[' -z 'export '\''JAVA_HOME=/usr/lib/jvm/java-11-openjdk'\''' ']'
+ cd ..
+ cat
+ '[' false = true ']'
+ cat
+ chmod a+x entry.sh
+ cat
+ echo 'export '\''JAVA_HOME=/usr/lib/jvm/java-11-openjdk'\''' ';' 'export '\''head=git@github.com:self-xdsd/self-core.git'\''' ';' 'export '\''pull_id=718'\''' ';' 'export '\''fork=git@github.com:criske/self-core.git'\''' ';' 'export '\''fork_branch=issue717'\''' ';' 'export '\''head_branch=master'\''' ';' 'export '\''pull_title=#717 Started implementing GitlabIssues.'\''' ';' 'export '\''author=amihaiemil'\''' ';' 'mvn clean install -Pcheckstyle,itcases' ';'
+ sensitive=()
+ gpgconf --reload gpg-agent
+ gpg --keyserver hkp://pool.sks-keyservers.net --verbose --recv-keys 9AF0FA4C
gpg: requesting key 9AF0FA4C from hkp server pool.sks-keyservers.net
gpg: keyserver timed out
gpg: keyserver receive failed: keyserver error
'cid' file is absent, container wasn't started correctly

@amihaiemil amihaiemil merged commit 8ba504d into self-xdsd:master Nov 27, 2020
@amihaiemil
Copy link
Member

@criske some puzzle is not correct, can you fix it pls? :D

@charlesmike
Copy link

@amihaiemil thank you for resolving this ticket. I've just added it to your active invoice. You can always check all your invoices and more on the Contributor Dashboard.

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.

Start Implementing GitlabIssues
4 participants