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

cEP-0016.md: Commit Content Inspection #114

Merged
merged 1 commit into from Jul 28, 2018

Conversation

@kriti21
Copy link
Contributor

commented May 3, 2018

This cEP the coala process rules which
will be enforced by GitCommitBear to handle
special types of commit messages like
git revert and git merge.

@kriti21 kriti21 force-pushed the kriti21:cEPgsoc18 branch from 9dfb94d to e6ea393 May 3, 2018

@jayvdb jayvdb requested review from guyzmo, damngamerz, seblat and refeed May 4, 2018

@kriti21 kriti21 force-pushed the kriti21:cEPgsoc18 branch 2 times, most recently from 7b803cf to af35d6f May 4, 2018

cEP-0016.md Outdated
encoding = diff.headers.getparam('charset')
patch1 = PatchSet(diff1, encoding=encoding)
patch2 = PatchSet(diff1, encoding=encoding)

This comment has been minimized.

Copy link
@refeed

refeed May 5, 2018

Member

Did you mean diff2 ?

cEP-0016.md Outdated
patch2 = PatchSet(diff1, encoding=encoding)
# compare patch1 and patch2 using unidiff
if not(patch1) == patch2:

This comment has been minimized.

Copy link
@refeed

refeed May 5, 2018

Member

I think practically probably we wanna do if not patch1 == patch2: (without the parentheses). However, this is just a draft, so it doesn't matter here ;)

cEP-0016.md Outdated
@@ -0,0 +1,178 @@
Commit Content Inspection

This comment has been minimized.

Copy link
@refeed

refeed May 5, 2018

Member

Shouldn't it be "Git Commit Content Inspection" ?

@kriti21 kriti21 force-pushed the kriti21:cEPgsoc18 branch from af35d6f to bb45e20 May 5, 2018

cEP-0016.md Outdated
| Status | Implementation due |
| Type | Process |

# Abstract

This comment has been minimized.

Copy link
@refeed

refeed May 6, 2018

Member

I think we can change this "Header 1" title to a "Heading 2" title (## Abstract)
and also change the "Header 1" which are below this line

"Header 1" is usually just used once and it just used for the title of the document itself.

This comment has been minimized.

Copy link
@kriti21

kriti21 May 6, 2018

Author Contributor

Done 👍

@kriti21 kriti21 force-pushed the kriti21:cEPgsoc18 branch 2 times, most recently from bc9703c to 20d86e5 May 6, 2018

@gitmate-bot gitmate-bot added New cEP and removed enhancement labels May 7, 2018

cEP-0016.md Outdated
This document describes coala process rules which will be enforced by the
GitCommitBear.

This cEP describes some new changes in the implementation of GitCommitBear

This comment has been minimized.

Copy link
@palash25

palash25 May 7, 2018

Member

Why do we have "this document describes" twice? It sounds weird while reading it. Can't you just write it in one paragraph?

Like "This document describes coala process rules which will be enforced by the GitCommitBear and some new changes in its implementation.........."

cEP-0016.md Outdated

The GitCommitBear at present performs a check on the content of regular commits
made to coala. However, there are many special types of commit messages that
should be only used in conjunction with patches containing a special type of

This comment has been minimized.

Copy link
@palash25

palash25 May 7, 2018

Member

should be only used -> should only be used

@seblat

seblat approved these changes May 7, 2018

Copy link

left a comment

Looks fine to me regarding the comments which have already been made

@kriti21 kriti21 force-pushed the kriti21:cEPgsoc18 branch from 20d86e5 to 54314bb May 7, 2018

cEP-0016.md Outdated
Here is the detailed implementation stepwise:

1. We start by identifying different types of special commits namely revert,
merge and travis commits.

This comment has been minimized.

Copy link
@jayvdb

jayvdb May 8, 2018

Member

indent.

also please run a markdown validator on your file.

This comment has been minimized.

Copy link
@jayvdb

jayvdb May 9, 2018

Member

#128 will enforce this.

@damngamerz
Copy link
Member

left a comment

LGTM :)
Well done on the mockups.

cEP-0016.md Outdated
2. Each type of commit is then handled as a separate case.
3. For travis commits:
* Merged commits are identified first.
* It's checked whether the merge commit contains `[ci skip]`.

This comment has been minimized.

Copy link
@jayvdb

jayvdb May 9, 2018

Member

no. [ci skip] is not a 'travis commit'

Please read more about [ci skip]

@kriti21 kriti21 force-pushed the kriti21:cEPgsoc18 branch from 54314bb to 46b8378 May 9, 2018

@gitmate-bot gitmate-bot removed the process/wip label May 9, 2018

@kriti21 kriti21 force-pushed the kriti21:cEPgsoc18 branch from 4e07533 to ea72712 Jul 9, 2018

@refeed

refeed approved these changes Jul 9, 2018

Copy link
Member

left a comment

lgtm

@kriti21 kriti21 force-pushed the kriti21:cEPgsoc18 branch 3 times, most recently from a83ea49 to bb414fe Jul 11, 2018

cEP-0016.md Outdated
it is not a clean revert is expected.
- A message suggesting improvements in the commit message is displayed.

## Code Prototypes

This comment has been minimized.

Copy link
@refeed

refeed Jul 12, 2018

Member

I think we might want to get rid of this section since it changes everytime the PR for VCSCommitBear updated, and it blocks this cEP to get merged faster. The explanation above is good enough imo :)

cEP-0016.md Outdated
corresponding CI engine allows skipping build or not. An appropriate message
is returned if skipping build is not supported.
- If the commit type from the output of `VCSCommitBear` indicates that the
commit skips CI build, inspection is done inside `CISkipInspectBear`

This comment has been minimized.

Copy link
@refeed

refeed Jul 12, 2018

Member

Also update this, VCSCommitBear is no longer providing COMMIT_TYPE.ci_skip_commit, all of the matching is done inside of the CISkipInspectBear.

cEP-0016.md Outdated
perform a `git rebase` instead.
7. For revert commits:
- If the commit type from the output of `VCSCommitBear` indicates that the
commit is a `git revert` commit, inspection is done in

This comment has been minimized.

Copy link
@refeed

refeed Jul 12, 2018

Member

Update this also

@kriti21 kriti21 force-pushed the kriti21:cEPgsoc18 branch from bb414fe to 335d0e2 Jul 12, 2018

@gitmate-bot gitmate-bot added size/S and removed size/M labels Jul 12, 2018

cEP-0016.md Outdated
- If the commit type from the output of `VCSCommitBear` indicates that the
commit is a `git merge` commit, inspection is done in `GitMergeInspectBear`
otherwise return.
- `GitMergeInspectBear` will be used by find if the commit tries to merge

This comment has been minimized.

Copy link
@refeed

refeed Jul 12, 2018

Member

by find

by finding

cEP-0016.md Outdated
- `GitCommitBear` would identify and check contents of the unmerged parent of
these merge commits.
4. A meta bear called `VCSCommitBear` would be created that would return a
`HiddenResult` comprising of a tuple that will contain information about

This comment has been minimized.

Copy link
@refeed

refeed Jul 12, 2018

Member

HiddenResult

CommitResult

@kriti21 kriti21 force-pushed the kriti21:cEPgsoc18 branch from 335d0e2 to 386ddb3 Jul 12, 2018

@jayvdb

jayvdb approved these changes Jul 28, 2018

@jayvdb

This comment has been minimized.

Copy link
Member

commented Jul 28, 2018

ack 386ddb3

@jayvdb

This comment has been minimized.

Copy link
Member

commented Jul 28, 2018

@gitmate-bot rebase

@gitmate-bot

This comment has been minimized.

Copy link

commented Jul 28, 2018

Hey! I'm GitMate.io! This pull request is being rebased automatically. Please DO NOT push while rebase is in progress or your changes would be lost permanently ⚠️

cEP-0016.md: Commit Content Inspection
This cEP describes the coala process rules
which will be enforced to handle special types
of commit messages like git revert and git merge.

Closes #112
@gitmate-bot

This comment has been minimized.

Copy link

commented Jul 28, 2018

Automated rebase with GitMate.io was successful! 🎉

@jayvdb

This comment has been minimized.

Copy link
Member

commented Jul 28, 2018

@gitmate-bot

This comment has been minimized.

Copy link

commented Jul 28, 2018

Hey! I'm GitMate.io! This pull request is being fastforwarded automatically. Please DO NOT push while fastforward is in progress or your changes would be lost permanently ⚠️

@gitmate-bot gitmate-bot merged commit ea25f09 into coala:master Jul 28, 2018

3 checks passed

review/gitmate/commit This commit has no issues. :)
Details
review/gitmate/manual/pr This PR is reviewed. :)
Details
review/gitmate/pr This PR has no issues. :)
Details
@gitmate-bot

This comment has been minimized.

Copy link

commented Jul 28, 2018

Automated fastforward with GitMate.io was successful! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.