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

All-contributors Github Bot does not recognise "custom types" for contributions (CLI does) #505

Open
JesperDramsch opened this issue Feb 13, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@JesperDramsch
Copy link

JesperDramsch commented Feb 13, 2025

Describe the bug
The all-contributors bot does not work on custom types.

To Reproduce
Steps to reproduce the behavior:

  1. Use the example from the docs:
{
  "projectName": "all-contributors",
  "projectOwner": "all-contributors",
  "repoType": "github",
  "repoHost": "https://github.com",
  "files": ["README.md"],
  "imageSize": 100,
  "commit": false,
  "contributorsPerLine": 7,
  "contributorsSortAlphabetically": false,
  "badgeTemplate": "[![All Contributors](https://img.shields.io/github/all-contributors/<%= projectOwner %>/<%= projectName %>?color=ee8449&style=flat-square)](#contributors)",
  "contributorTemplate": "<a href=\"<%= contributor.profile %>\"><img src=\"<%= contributor.avatar_url %>\" width=\"<%= options.imageSize %>px;\" alt=\"\"/><br /><sub><b><%= contributor.name %></b></sub></a>",
  "wrapperTemplate": "\n<table>\n  <tbody><%= bodyContent %>  </tbody>\n<%= tableFooterContent %></table>\n\n",
  "types": {
    "custom": {
      "symbol": "🔭",
      "description": "A custom contribution type.",
      "link": "[<%= symbol %>](<%= url %> \"<%= description %>\"),"
    }
  },
  "linkToUsage": true,
  "skipCi": true,
  "contributors": []
}
  1. Comment @all-contributors please add @<username> for custom.
  2. Get a confused bot comment

I couldn't determine any contributions to add, did you specify any contributions?
Please make sure to use valid contribution names.

Expected behavior
A clear and concise description of what you expected to happen.

It should work with custom types, as the CLI does.

Screenshots
If applicable, add screenshots to help explain your problem.

Made a quick example here: JesperDramsch/python-deadlines#53

Image

The config has this entry and works with CI:

{
...
"types": {
    "conference": {
      "symbol": "📆",
      "description": "Python conference (Added or updated)",
      "link": "#conference-<%= contributor.login %>"
    }
  },
...
}

Additional context
Add any other context about the problem here.

It works using the CLI, so I assume my config is alright. I have made the quick example with myself as to avoid pings. It has not worked on other accounts as well.

@JesperDramsch JesperDramsch added the bug Something isn't working label Feb 13, 2025
@JesperDramsch
Copy link
Author

I assume that the hardcoded line here is the problem:

const validContributionTypes = [

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant