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

We need a nit-fixing-bot #2672

Closed
eshellman opened this issue Dec 28, 2017 · 12 comments
Closed

We need a nit-fixing-bot #2672

eshellman opened this issue Dec 28, 2017 · 12 comments
Labels
help wanted Needs help solving a blocked / stucked item New Feature New feature / enhancement / translation...

Comments

@eshellman
Copy link
Collaborator

At least half of all contributions to free-programming-books get tripped up by the linter, which is picky about blank spaces, list collation, pdf links and the like. These are things that could be fixed by a bot, which could add commits fixing minor errors. This would cut the administration overhead significantly and would reduce contributor frustration, improving the experience for all involved.

@eshellman eshellman added help wanted Needs help solving a blocked / stucked item New Feature New feature / enhancement / translation... labels Dec 28, 2017
@borgified
Copy link
Contributor

i googled a bit and found this: https://stickler-ci.com/
i think we should be able to integrate it to our repo but first we should test it out and make sure it fits our needs. ill get around to doing this eventually but if anyone would like to give it a shot and see if it does what it says on the tin, please feel free to do so (and report back the results here)

@eshellman
Copy link
Collaborator Author

Interesting!

@borgified
Copy link
Contributor

i still intend to revisit this soon™ but i came across this while looking for something related which i think is relevant so im leaving it here for later https://github.com/bluzi/travis-buddy

@eshellman
Copy link
Collaborator Author

Maybe someone can try out @TravisBuddy on a fork and report back.

@borgified
Copy link
Contributor

i just tried it in my repo. you can check out the behavior here: borgified#2
if you like that, ill create a PR and then we can merge it. squash commits before merging though, no need to pollute the git history with my testing.

@zhongjiajie
Copy link
Contributor

@borgified I don't think it behavior achive our purpose. In your ofrk PR borgified#2 It just tell contributor whether PR failed or not, and where failed.
we want a bot to tell contributor how to pass CI, or even auto change contribute PR to pass CI test.
Am I right @eshellman

@LincePotiguara
Copy link

I looked at the tool to see if it is capable of checking what went wrong in a Pull Rrequest (PR)

Here is what I've found:

  • Travis-buddy will check the build log and send back just what didn't succeed
  • It has some default checking
  • It is possible to add custom rules

The PR created by @borgified show the tool in it's "raw" form.
In order to present nicely the test fails it require configuration. In our case, we would need a script specify the rules.
The best aplication I could find is this with this configuration.
I also research the documentation and the only meaningful example I came across was this.

Conclusion

It's quite possible to hack this bot into this project it will just take some work.

@borgified
Copy link
Contributor

borgified commented Mar 3, 2019 via email

@ShipsWithCannons
Copy link

Stickler looks more promising indeed. The features of Travis-buddy seem to align more with what we already have in the already used Travis CI.

Web forms could work, but that sounds like trading problems instead of fixing them. So if anyone has the time and energy to go figure this out, I'd say focus on Stickler for now.

@borgified
Copy link
Contributor

i went ahead and tested sticklerci and i dont think it'll be able to do what we expect it to do. the automatic fixing is restricted to their list of linters, ie. since we have our own linter with our own specific set of rules, it's not gonna be able to automate fixes.

also i had a hard time getting it to work, im not sure if im configuring it wrong or if it just doesnt quite work: borgified#3 i just couldnt get it to fail

@borgified
Copy link
Contributor

our current linter i think is similar to eslint. i've never written a custom linter before but i've recently discovered that they also have the ability to "autofix" issues. it might be worthwhile to piggyback on the existing linter and implement the fixer portion.

our existing linter: https://github.com/vhf/free-programming-books-lint
googling around: https://flexport.engineering/writing-custom-lint-rules-for-your-picky-developers-67732afa1803

if anyone has prev experience you are more than welcome to take a crack at it, if not, i'll get to it eventually...

@bluzi
Copy link

bluzi commented Oct 2, 2019

Hello everyone,

Sorry to bump this issue after few months of inactivity, but I'm thinking about implementing an autofix feature for TravisBuddy, and I came across this issue and found your use case very interesting.

Would love to hear whether you've figured it out already and if so how?
Also I am not sure yet how this is going to be implemented for TravisBuddy but I'd love to hear what is the interface that most benefits in your use case, if it makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Needs help solving a blocked / stucked item New Feature New feature / enhancement / translation...
Projects
None yet
Development

No branches or pull requests

7 participants
@ShipsWithCannons @eshellman @borgified @LincePotiguara @bluzi @zhongjiajie and others