Skip to content

BUG: List of contributors is incorrect #131

@bsipocz

Description

@bsipocz

Describe the bug

There is a recent test failure, and unfortunately it looks to be legit; it swaps a contributor with someone who had no activity at all in the repos we use for testing (and their activity link is also empty).

The test was added recently in 5b3f082 (#128)

________________________________________________________________ test_contributor_sorting ________________________________________________________________

tmpdir = local('/private/var/folders/9s/070g0pd502q70k3gffpxv8km0000gq/T/pytest-of-bsipocz/pytest-554/test_contributor_sorting0')
file_regression = <pytest_regressions.file_regression.FileRegressionFixture object at 0x1061d2a80>

    def test_contributor_sorting(tmpdir, file_regression):
        """Test that PR author appears first, then rest of contributors, sorted"""
        path_tmp = Path(tmpdir)
        path_output = path_tmp.joinpath("out.md")
    
        org, repo = ("jupyter-book", "mystmd")
    
        cmd = (
            f"github-activity {org}/{repo} -s [email protected] -u [email protected] -o {path_output}"
        )
        run(cmd.split(), check=True)
        md = path_output.read_text()
>       file_regression.check(md, extension=".md")
E       AssertionError: FILES DIFFER:
E       /private/var/folders/9s/070g0pd502q70k3gffpxv8km0000gq/T/pytest-of-bsipocz/pytest-554/test_contributor_sorting0/test_contributor_sorting.md
E       /private/var/folders/9s/070g0pd502q70k3gffpxv8km0000gq/T/pytest-of-bsipocz/pytest-554/test_contributor_sorting0/test_contributor_sorting.obtained.md
E       HTML DIFF: /private/var/folders/9s/070g0pd502q70k3gffpxv8km0000gq/T/pytest-of-bsipocz/pytest-554/test_contributor_sorting0/test_contributor_sorting.obtained.diff.html
E       --- 
E       +++ 
E       @@ -29,4 +29,4 @@
E        
E        ([GitHub contributors page for this release](https://github.com/jupyter-book/mystmd/graphs/contributors?from=2025-07-05&to=2025-07-21&type=c))
E        
E       -@agoose77 ([activity](https://github.com/search?q=repo%3Ajupyter-book%2Fmystmd+involves%3Aagoose77+updated%3A2025-07-05..2025-07-21&type=Issues)) | @brian-rose ([activity](https://github.com/search?q=repo%3Ajupyter-book%2Fmystmd+involves%3Abrian-rose+updated%3A2025-07-05..2025-07-21&type=Issues)) | @brianhawthorne ([activity](https://github.com/search?q=repo%3Ajupyter-book%2Fmystmd+involves%3Abrianhawthorne+updated%3A2025-07-05..2025-07-21&type=Issues)) | @bsipocz ([activity](https://github.com/search?q=repo%3Ajupyter-book%2Fmystmd+involves%3Absipocz+updated%3A2025-07-05..2025-07-21&type=Issues)) | @choldgraf ([activity](https://github.com/search?q=repo%3Ajupyter-book%2Fmystmd+involves%3Acholdgraf+updated%3A2025-07-05..2025-07-21&type=Issues)) | @kp992 ([activity](https://github.com/search?q=repo%3Ajupyter-book%2Fmystmd+involves%3Akp992+updated%3A2025-07-05..2025-07-21&type=Issues)) | @rowanc1 ([activity](https://github.com/search?q=repo%3Ajupyter-book%2Fmystmd+involves%3Arowanc1+updated%3A2025-07-05..2025-07-21&type=Issues)) | @stefanv ([activity](https://github.com/search?q=repo%3Ajupyter-book%2Fmystmd+involves%3Astefanv+updated%3A2025-07-05..2025-07-21&type=Issues))
E       +@agoose77 ([activity](https://github.com/search?q=repo%3Ajupyter-book%2Fmystmd+involves%3Aagoose77+updated%3A2025-07-05..2025-07-21&type=Issues)) | @brian-rose ([activity](https://github.com/search?q=repo%3Ajupyter-book%2Fmystmd+involves%3Abrian-rose+updated%3A2025-07-05..2025-07-21&type=Issues)) | @brianhawthorne ([activity](https://github.com/search?q=repo%3Ajupyter-book%2Fmystmd+involves%3Abrianhawthorne+updated%3A2025-07-05..2025-07-21&type=Issues)) | @bsipocz ([activity](https://github.com/search?q=repo%3Ajupyter-book%2Fmystmd+involves%3Absipocz+updated%3A2025-07-05..2025-07-21&type=Issues)) | @choldgraf ([activity](https://github.com/search?q=repo%3Ajupyter-book%2Fmystmd+involves%3Acholdgraf+updated%3A2025-07-05..2025-07-21&type=Issues)) | @kp992 ([activity](https://github.com/search?q=repo%3Ajupyter-book%2Fmystmd+involves%3Akp992+updated%3A2025-07-05..2025-07-21&type=Issues)) | @naokic3 ([activity](https://github.com/search?q=repo%3Ajupyter-book%2Fmystmd+involves%3Anaokic3+updated%3A2025-07-05..2025-07-21&type=Issues)) | @rowanc1 ([activity](https://github.com/search?q=repo%3Ajupyter-book%2Fmystmd+involves%3Arowanc1+updated%3A2025-07-05..2025-07-21&type=Issues)) | @stefanv ([activity](https://github.com/search?q=repo%3Ajupyter-book%2Fmystmd+involves%3Astefanv+updated%3A2025-07-05..2025-07-21&type=Issues))

tests/test_cli.py:144: AssertionError

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions