Skip to content
Snippets Groups Projects
  • jNullj's avatar
    67d93549
    feat: Add author filter option for [GithubCommitActivity] (#9251) · 67d93549
    jNullj authored
    
    * feat: Add author filter option for CommitActivity
    
    Add a new filter option to [GithubCommitActivity], allowing users to filter the commit activity by a specific author.
    
    To make the filter more explicit, The label display "commits by [author]" for the total amount of commits and "commit activity by [author]" for other intervals when an author filter is selected.
    
    To maintain a clear and organized code structure, The filtered author is added as an argument and not to the shield path.
    
    The request to find the number of commits by the author is made using the REST api rather then the GraphQL api to make it in 1 request rather then 2.
    
    Resolves #9215
    
    * fix: solve eslint errors
    
    * Add tests for [GithubCommitActivity] filter by author
    
    Add tests for the new filter by author feature.
    
    * update [GithubCommitActivity] spec file for new author feat
    
    Add test for new transformAuthorFilter function of GithubCommitActivity added for the author filter feature.
    
    * Fix null string for label of GithubCommitActivity
    
    * Update GithubCommitActivity example
    
    * improve error handeling for GithubCommitActivity
    
    The author filter error handling removed was redundent as it would never execute, there is no way to seperate branch not found from repo not found.
    
    * update depricated functions
    
    PR #9233 replaced errorsMessages with httpErrors.
    This commit updates the new changes to stay up to date with that PR
    
    * remove test for nonexisting error
    
    this exception was removed in commit 9e358c8 and is not needed anymore
    
    * Fixed test for commit activity unexisting repo
    
    * Update example for GithubCommitActivity
    
    Picked a user with commits in the repo as an example that would work
    
    * Add test for invalid commit activity branch
    
    Add test for REST API calls in commit activity branch
    
    ---------
    
    Co-authored-by: default avatarjNullj <jNullj@users.noreply.github.com>
    67d93549
    History
    feat: Add author filter option for [GithubCommitActivity] (#9251)
    jNullj authored
    
    * feat: Add author filter option for CommitActivity
    
    Add a new filter option to [GithubCommitActivity], allowing users to filter the commit activity by a specific author.
    
    To make the filter more explicit, The label display "commits by [author]" for the total amount of commits and "commit activity by [author]" for other intervals when an author filter is selected.
    
    To maintain a clear and organized code structure, The filtered author is added as an argument and not to the shield path.
    
    The request to find the number of commits by the author is made using the REST api rather then the GraphQL api to make it in 1 request rather then 2.
    
    Resolves #9215
    
    * fix: solve eslint errors
    
    * Add tests for [GithubCommitActivity] filter by author
    
    Add tests for the new filter by author feature.
    
    * update [GithubCommitActivity] spec file for new author feat
    
    Add test for new transformAuthorFilter function of GithubCommitActivity added for the author filter feature.
    
    * Fix null string for label of GithubCommitActivity
    
    * Update GithubCommitActivity example
    
    * improve error handeling for GithubCommitActivity
    
    The author filter error handling removed was redundent as it would never execute, there is no way to seperate branch not found from repo not found.
    
    * update depricated functions
    
    PR #9233 replaced errorsMessages with httpErrors.
    This commit updates the new changes to stay up to date with that PR
    
    * remove test for nonexisting error
    
    this exception was removed in commit 9e358c8 and is not needed anymore
    
    * Fixed test for commit activity unexisting repo
    
    * Update example for GithubCommitActivity
    
    Picked a user with commits in the repo as an example that would work
    
    * Add test for invalid commit activity branch
    
    Add test for REST API calls in commit activity branch
    
    ---------
    
    Co-authored-by: default avatarjNullj <jNullj@users.noreply.github.com>