chaoss / grimoirelab-elk

GNU General Public License v3.0
58 stars 121 forks source link

Specify exact mappings for date fields in git documents #1099

Closed Rafaeltheraven closed 1 year ago

Rafaeltheraven commented 1 year ago

Simple PR, just specifies that AuthorDate and CommitDate are date fields in ES. This allows us to later do better filtering such as being able to specify AuthorDate <= {Some Date}.

Rafaeltheraven commented 1 year ago

Amended the commit message and made the tests pass is the rebase good like this? I must admit I am not very familiar with more "proper" advanced git techniques.

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 3948257475


Totals Coverage Status
Change from base Build 3930924127: 0.02%
Covered Lines: 9103
Relevant Lines: 11059

💛 - Coveralls
sduenas commented 1 year ago

Amended the commit message and made the tests pass is the rebase good like this? I must admit I am not very familiar with more "proper" advanced git techniques.

You need to run the command git rebase -i master on the branch of this PR. The editor will open with a list of commits, for the 2nd o the last one, where it says pick replace it by an s(squash), and save the file. The editor will show again the messages you wrote for each commit. Remove everything and paste this:

[schema] Specify exact mappings for data fields in git documents

This allows us to later do better filtering such as
being able to specify AuthorDate <= {Some Date}.
Tests updated accordingly.

The format is compatible with ES6, using `MMM`
instead of `LLL` for the month section.

Signed-off-by: Rafael Dulfer <rafael.dulfer@gmail.com>

Save the file and git will squash your commits into a single one and your branch will be updated with the latest commits from master. Then, push the commits again to the branch on the remote repository with the option --force

Rafaeltheraven commented 1 year ago

Thanks for the guide! Took me a couple of tries, but it's all squashed now

sduenas commented 1 year ago

Thanks for the guide! Took me a couple of tries, but it's all squashed now

You almost did it :). Apparently, you didn't pull the latest commits from the master branch in your fork. I see that the last commit you have is 25c2895c - two months ago- . You have to sync your repo first.

I can do the rebase of your PR but I don't have permissions to write in your branch.

Rafaeltheraven commented 1 year ago

Oh yeah, those got destroyed in my rebasing adventure... After another fun adventure they're merged in now.

sduenas commented 1 year ago

@Rafaeltheraven thanks for your contribution! I successfully merged it. I hope you have learnt some new things with git :)