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

I am unable to get anything in Notable Contribution. #505

Closed
ninjakx opened this issue Aug 28, 2021 · 5 comments · Fixed by #516
Closed

I am unable to get anything in Notable Contribution. #505

ninjakx opened this issue Aug 28, 2021 · 5 comments · Fixed by #516

Comments

@ninjakx
Copy link

ninjakx commented Aug 28, 2021

pic

Workflow:


name: Metrics
on:
  # Schedule updates (each hour)
  
  schedule: [{cron: "0 * * * *"}]
  # Lines below let you run workflow manually and on each commit
  workflow_dispatch:
  push: {branches: ["master", "main"]}
jobs:
  github-metrics:
    runs-on: ubuntu-latest
    steps:
      - name: display_information_1
        uses: lowlighter/metrics@latest
        with:
          # Your GitHub token
          token: ${{ secrets.METRICS_TOKEN }}
          user: ninjakx
          # template
          template: classic
          # base
          base: activity, community, repositories, metadata
          # timezone
          config_timezone: Asia/Kolkata
          # filename
          filename: github-metrics.svg
          # programming language
          plugin_languages: yes
          plugin_languages_ignored: html, css
          plugin_languages_skipped: my-testing-repo
          plugin_languages_details: percentage
          plugin_languages_threshold: 2%
          plugin_languages_limit: 15
          plugin_languages_sections: most-used, recently-used
          plugin_languages_indepth: no
          plugin_languages_recent_load: 500
          plugin_languages_recent_days: 7
          commits_authoring: ninjakx
          # coding habits
          plugin_habits: yes
          plugin_habits_from: 200
          plugin_habits_facts: yes
          plugin_habits_charts: yes
          plugin_habits_trim: yes
          # line of code changed
          plugin_lines: yes
          # topics
          plugin_topics: yes
          plugin_topics_sort: stars
          plugin_topics_mode: mastered
          plugin_topics_limit: 0
          # recent activity
          plugin_activity: yes
          plugin_activity_limit: 5
          plugin_activity_days: 14
          plugin_activity_filter: all
          # notable contrib
          plugin_notable: yes
          plugin_notable_filter: stars:>500
          plugin_notable_repositories: no

      #achievements
      - name: display_achievement
        uses: lowlighter/metrics@latest
        with:
          filename: achievements-metrics.svg
          token: ${{ secrets.METRICS_TOKEN }}
          base: ""
          plugin_achievements: yes
          plugin_achievements_display: compact
          config_display: large
          
      # notable contrib
      - name: display_contribution
        uses: lowlighter/metrics@latest
        with:
          filename: contribution.svg
          token: ${{ secrets.METRICS_TOKEN }}
          base: metadata
          repositories_batch: 5
          plugin_notable: yes
          config_padding: 0, 8 + 1%

Token Settings:

public_repo, read:org, read:user

@ninjakx
Copy link
Author

ninjakx commented Aug 28, 2021

Can you explain this Notable Contributions thing? Is it same as Organization showing in activity feed?

@lowlighter
Copy link
Owner

It should display organizations where you committed at least once to the main branch of one of its repository.

It might be slightly different than the Github feed because the lattest also displays it if you opened an issue 🙂


I haven't looked yet in depth what you reported though, it's possible that's there's an issue

@ninjakx
Copy link
Author

ninjakx commented Aug 28, 2021

@lowlighter : I created 2 pull request in covidIndia repository last year, so it should display that org if this is not considering the latest (this yr) contribution.

@lowlighter
Copy link
Owner

@ninjakx Yeah I think it's highly probable that only last year is taken in account.

Will check if it's possible to edit the GraphQL query to load all years

@lowlighter
Copy link
Owner

So I checked but it doesn't seem possible to get past one year without using execessively expansive API requests.

I also tried to use the commitContributionsByRepository which seemed promising, but it's limited to 100 repositories without any cursor.

query NotableContributions {
  user(login: "ninjakx") {
    contributionsCollection {
      totalRepositoriesWithContributedCommits
      commitContributionsByRepository(maxRepositories: 100) {
        repository {
          nameWithOwner
        }
      }
    }
  }
}

And I couldn't found any mention the repository you mentioned in it though, the only one reported were:

  • ninjakx/Coding-practice
  • ninjakx/ninjakx
  • ninjakx/youtube-video2ppt
  • ninjakx/covid_dash
  • ninjakx/Restaurant-billing-app

So current implementation seems to be better given that.

I don't think it's really fixable (it's more an API limitation), #516 will display an empty message to say that no recent contribution in organization were found instead of displaying en empty section like you got, it'll at least be more explicit 🙂

@github-actions github-actions bot locked and limited conversation to collaborators Sep 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants