Skip to content

feat(copier): add --yes to npx all-contributors-cli for ci and test initial_commit and add_me_as_contributor#903

Merged
browniebroke merged 14 commits intobrowniebroke:mainfrom
34j:feat/npx-yes
Mar 12, 2025
Merged

feat(copier): add --yes to npx all-contributors-cli for ci and test initial_commit and add_me_as_contributor#903
browniebroke merged 14 commits intobrowniebroke:mainfrom
34j:feat/npx-yes

Conversation

@34j
Copy link
Copy Markdown
Contributor

@34j 34j commented Feb 22, 2025

Description of change

Pull-Request Checklist

  • Code is up-to-date with the main branch
  • This pull request follows the contributing guidelines.
  • This pull request links relevant issues as Fixes #0000
  • There are new or updated unit tests validating the change
  • Documentation has been updated to reflect this change
  • The new commits follow conventions outlined in the conventional commit spec, such as "fix(api): prevent racing of requests".
  • If pre-commit.ci is failing, try pre-commit run -a for further information.
  • If CI / test is failing, try uv run pytest for further information.

@34j
Copy link
Copy Markdown
Contributor Author

34j commented Feb 22, 2025

setting email=41898282+github-actions[bot]@users.noreply.github.com does not work due to
python/cpython#122477

@34j 34j changed the title feat(copier): add --yes to npx all-contributors-cli for ci and test it feat(copier): add --yes to npx all-contributors-cli for ci and test initial_commit and add_me_as_contributor Feb 22, 2025
@34j
Copy link
Copy Markdown
Contributor Author

34j commented Feb 22, 2025

Changed to use add_me_as_contributor=yes only on Linux because the following error occurs in macOS tests.

Error: API rate limit exceeded for 13.105.117.149.
```

@34j 34j mentioned this pull request Feb 22, 2025
6 tasks
@34j
Copy link
Copy Markdown
Contributor Author

34j commented Feb 22, 2025

Single quotation marks do not seem to work on Windows, so this has been fixed. It should be fine now.

@34j
Copy link
Copy Markdown
Contributor Author

34j commented Feb 27, 2025

@browniebroke What about this PR? This does not affect the results, and just makes only a few changes to copier.yml to extend the scope of the test. It also fixes issues in Windows (replaces single quotes with double quotes everywhere). (The commitizen category could also be “test” or "fix")

@34j
Copy link
Copy Markdown
Contributor Author

34j commented Mar 11, 2025

@browniebroke

Comment thread tests/test_generate_project.py Outdated
"setup_github": False,
"setup_pre_commit": False,
"add_me_as_contributor": False,
"add_me_as_contributor": platform == "linux",
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we leave the base answers as is and test this in a dedicated test case?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed only “add_me_as_contributor” and created a separate test case which enables it and tests .allcontributorsc. Is it enough? What is your concern?

Comment thread copier.yml
@browniebroke browniebroke merged commit 7616a6a into browniebroke:main Mar 12, 2025
@34j 34j deleted the feat/npx-yes branch March 13, 2025 07:20
Comment on lines +408 to +409
if CI and platform == "darwin":
pytest.skip("Skipping due to APi rate limit")
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out all-contributors-cli add makes some API calls to GitHub to resolve some details based on the username. Could we remove this test from CI or run it only once?

Comment thread .github/workflows/ci.yml
--data 'open_source_license=MIT' \
${{ matrix.extra_options.value }} \
--data 'initial_commit=yes' \
--data 'add_me_as_contributor=yes' \
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we run it only on one of the combination instead of all of them please? Would reduce change of rate limit

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