github-activity-readme icon indicating copy to clipboard operation
github-activity-readme copied to clipboard

Add option to customize messages

Open Andre601 opened this issue 3 years ago • 1 comments

It would be a great addition, if there was a way to customize the messages displayed and used within the readme file.

Imagine the following example settings:

name: Update README

on:
  schedule:
    - cron: '0 0 */1 * *' # Runs every day at 00:00
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    name: Update Profile README

    steps:
      - uses: actions/checkout@v2
      - uses: jamesgeorge007/github-activity-readme@master
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          COMMIT_MSG: "Update latest activity in README"

          COMMENT: "Commented on [{REPO}{ID}]({URL})"

          # PR Actions
          OPEN_PR: "Opened PR [{REPO}{ID}]({URL})"
          MERGE: "Merged Pull request [{REPO}{ID}]({URL})"
          CLOSE_PR: "Denied Pull request [{REPO}{ID}]({URL})"

          # Issue Actions
          OPEN_ISSUE: "Opened Issue [{REPO}{ID}]({URL})"
          CLOSE_ISSUE: "Closed Issue [{REPO}{ID}]({URL})"

{REPO} and {ID} are example placeholders and other syntaxes for them could be used. They essentially are replaced with the :user/:repository and issue/PR id (#:id) respectively.

The above example setup could result in the following 5 entries being displayed:

  1. Opened Issue jamesgeorge007/github-activity-readme#52
  2. Merged Pull request jamesgeorge007/github-activity-readme#41
  3. Commented on jamesgeorge007/github-activity-readme#52
  4. Denied Pull request jamesgeorge007/github-activity-readme#34
  5. Commented on jamesgeorge007/github-activity-readme#52

The above examples are taken from Pull requests and issues in this repository to give a better example of my point. I really hope this can be implemented as it would allow a lot more customization of the displayed info and could allow to blend it into the style of your Readme a bit more.

Andre601 avatar Apr 23 '21 23:04 Andre601

I'll considered it. Thank you for the detailed description.

tuunit avatar May 31 '23 08:05 tuunit