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

Support for multiple GH_USERNAME #110

Open
tushar5526 opened this issue Sep 22, 2023 · 4 comments
Open

Support for multiple GH_USERNAME #110

tushar5526 opened this issue Sep 22, 2023 · 4 comments

Comments

@tushar5526
Copy link

Add support to show recent activities of multiple accounts on your readme. GH_USERNAME can be a list of accounts to track.

@tuunit
Copy link
Collaborator

tuunit commented Sep 22, 2023

My concern is about feature creep. This Action is simple their to give other people some idea about what you are currently working on and not meant for tracking other or multiple accounts? What's your opinion about this @jamesgeorge007? Same goes for #109

@tushar5526
Copy link
Author

tushar5526 commented Sep 22, 2023

Oh, I currently maintain a bot named pep8speaks that comments on PRs with linting changes. As the bot is used by a lot of projects, we were planning to showcase the bot's recent activity on the README of the project.

The feature to track multiple accounts comes from the idea of having a common Readme on the org's page to showcase all the bots that we have.

@jamesgeorge007
Copy link
Owner

I agree with @tuunit. This is a very niche use case and will lead to unnecessary complexity, given that the underlying library doesn't support it out of the box. Let's keep this open and see if there are similar interests.

@tuunit
Copy link
Collaborator

tuunit commented Sep 23, 2023

@tushar5526

A solution I can propose to you is the following:

  1. You can run the action multiple times (once for each bot)
  2. Write the output to different files using the TARGET_FILE input Parameter
  3. Run a simple step in the end to concatenate everything inside the orgs readme

Pseudo code:

- name: Bot1 Activity
  uses: [email protected]
  with:
    GH_USERNAME: bot1
    TARGET_FILE: bot1.md
.
.
.
- name: Concatenate README.md
  run: |
       # first cat overwrites the current content and all following statements append
       cat bot1.md > README.md
       cat bot2.md >> README.md
       cat bot3.md >> README.md

- name: push
  uses: github-actions-x/[email protected]
  with:
    github-token: ${{ secrets.GITHUB_TOKEN }}
    push-branch: 'master'
    commit-message: 'update bots activity'
    rebase: 'true'

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

No branches or pull requests

3 participants