all-contributors / app

🤖 A GitHub App to automate acknowledging contributors to your open source projects
https://allcontributors.org
MIT License
576 stars 150 forks source link

feat: allow git commit type to be changed in configuration #462

Closed tobiasbueschel closed 1 year ago

tobiasbueschel commented 1 year ago

What: This allows users of the All Contributors app to configure the Git commit tag that the tool should use to add new contributors.

Why: Adding this will help users to customize the Git commit tag, which can be helpful in situations where you don't want that All Contributors changes appear in an auto-generated changelog that considers e.g., all docs commits.

Instead, one can overwrite it to be chore and therefore the All Contributors changes wouldn't appear in a changelog. One could argue that only features or bug fixes should appear in changelogs, but I have a few use cases where we're developing documentation apps using Docusaurus and configured semantic-release to also consider any docs commit tags for the changelog.

How: I've followed a similar pattern that was used for commitConvention and introduced commitType which is configurable.

Checklist:

Do let me know if there's anything else I shall change in this PR? :)

Thanks

vercel[bot] commented 1 year ago

@tobiasbueschel is attempting to deploy a commit to the All Contributors Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
app ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 21, 2023 10:46pm
gr2m commented 1 year ago

Not sure why the tests are failing 🤔

But I pointed https://github.com/apps/all-contributors-preview to the preview deployment. Can you give it a try on a test repository to see if it all works as expected? Make sure you don't have https://github.com/apps/allcontributors already installed in the same repo

tobiasbueschel commented 1 year ago

Not sure why the tests are failing 🤔

But I pointed github.com/apps/all-contributors-preview to the preview deployment. Can you give it a try on a test repository to see if it all works as expected? Make sure you don't have github.com/apps/allcontributors already installed in the same repo

I've updated the tests which should also fix the deployed version - sorry for the oversight as I missed updating one variable! Here's the test repository, once the new version is deployed I can test it :)

https://github.com/tobiasbueschel/all-contributors-test

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (c733295) 100.00% compared to head (c03d7b7) 100.00%.

:exclamation: Current head c03d7b7 differs from pull request most recent head ba0aab7. Consider uploading reports for the commit ba0aab7 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #462 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 16 16 Lines 451 453 +2 Branches 53 54 +1 ========================================= + Hits 451 453 +2 ``` | [Impacted Files](https://app.codecov.io/gh/all-contributors/app/pull/462?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=all-contributors) | Coverage Δ | | |---|---|---| | [lib/add-contributor.js](https://app.codecov.io/gh/all-contributors/app/pull/462?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=all-contributors#diff-bGliL2FkZC1jb250cmlidXRvci5qcw==) | `100.00% <100.00%> (ø)` | | | [lib/modules/config.js](https://app.codecov.io/gh/all-contributors/app/pull/462?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=all-contributors#diff-bGliL21vZHVsZXMvY29uZmlnLmpz) | `100.00% <100.00%> (ø)` | | | [lib/modules/repository.js](https://app.codecov.io/gh/all-contributors/app/pull/462?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=all-contributors#diff-bGliL21vZHVsZXMvcmVwb3NpdG9yeS5qcw==) | `100.00% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

gr2m commented 1 year ago

once the new version is deployed I can test it

ready 👍🏼

tobiasbueschel commented 1 year ago

once the new version is deployed I can test it

I'll have to ask you to redeploy again :) Glad that we tested as I found that the PR title updated with the correct commit type, but the two commits that were push as part of the PR still had the old commit type.

image

I've pushed a fix to update it - and now it should work fully :)

gr2m commented 1 year ago

I found that the PR title updated with the correct commit type, but the two commits that were push as part of the PR still had the old commit type

Great catch!

I updated the webhook URL. I actually found that there is URL that remains the same for this pull request:https://app-git-fork-tobiasbueschel-master-all-contributors.vercel.app/

Next time I'll know :D

tobiasbueschel commented 1 year ago

Thanks again @gr2m the demo repository works now: https://github.com/tobiasbueschel/all-contributors-test/pull/4

gr2m commented 1 year ago

@all-contributors please add @tobiasbueschel for code and testing

allcontributors[bot] commented 1 year ago

@gr2m

I've put up a pull request to add @tobiasbueschel! :tada:

github-actions[bot] commented 1 year ago

:tada: This PR is included in version 1.19.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: