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

Feature/display authors names from git repo #290

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

ammardev
Copy link

@ammardev ammardev commented Jan 10, 2022

Hello there,

This is a draft PR for getting information about each individual page author.
Data about authors are fetched from the GIT repository.

It's an improved version of "Added/updated by - from git" in Future Development issue #6.

These are some examples of the final result:

  • A page with one contributor:
    image

  • A page with many contributors:
    image

The design is inspired by vs code feature:
image

This update needs some refactoring and work. But I wanted to get feedback from the repo owner and the community before implementing the whole feature. So, please feel free to comment if you have any ideas or improvements for this feature.

The remaining tasks to complete this draft:

  • Backend tasks
    • Extract all git-related logic to a separate class.
    • Check if git is installed before executing the needed commands.
    • Check if the file is committed in a repository. (Ignore if not committed)
    • Add configuration in the conf file to disable/enable git features.
    • Add tests.
  • Frontend tasks
    • Expand the list of authors on click (Maybe I will expand it in a modal, Not sure yet)

@saleem-hadad
Copy link
Owner

This is very cool, are you planning to continue? @ammardev

@ammardev
Copy link
Author

ammardev commented Apr 2, 2022

Yes, Of course.

I'm busy right now, But I would like to continue as soon as possible.

@saleem-hadad
Copy link
Owner

Hi @ammardev , I hope you're doing well.
any updates on this PR?

@ammardev
Copy link
Author

Hi @saleem-hadad , I'm OK thanks.

I didn't have much time to contribute to open-source projects in the previous few months. But I'm planning to continue soon.
I'll try to finish this PR the next weekend

@ammardev
Copy link
Author

ammardev commented Aug 1, 2022

Hello, @saleem-hadad

Sorry for being late.

My updates are finished for the backend side. I was planning to write some tests. But then I realized that I can't actually mock git operations (Commits). Do you have any idea for testing?

@saleem-hadad
Copy link
Owner

Yes, you can have an interface for GitService and then mock the interface in testing, similar to this logic
https://github.com/saleem-hadad/larecipe/blob/master/tests/Feature/InterchangeableMarkdownParserTest.php#L26

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.

2 participants