jamesgeorge007 / jamesgeorge007/github-activity-readme

Add option to customize messages

Open
#52 1 comment 6 reactions 0 assignees View on GitHub
feature
Dominant language
JavaScript
Stars
953
Forks
241
PR merge metrics
No merged PRs in 30d

Description

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:
```yaml
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](https://github.com/jamesgeorge007/github-activity-readme)[#52](https://github.com/jamesgeorge007/github-activity-readme/issues/52)
2. Merged Pull request [jamesgeorge007/github-activity-readme](https://github.com/jamesgeorge007/github-activity-readme)[#41](https://github.com/jamesgeorge007/github-activity-readme/issues/41)
3. Commented on [jamesgeorge007/github-activity-readme](https://github.com/jamesgeorge007/github-activity-readme)[#52](https://github.com/jamesgeorge007/github-activity-readme/issues/52)
4. Denied Pull request [jamesgeorge007/github-activity-readme](https://github.com/jamesgeorge007/github-activity-readme)[#34](https://github.com/jamesgeorge007/github-activity-readme/issues/34)
5. Commented on [jamesgeorge007/github-activity-readme](https://github.com/jamesgeorge007/github-activity-readme)[#52](https://github.com/jamesgeorge007/github-activity-readme/issues/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.

Contributor guide

No contributing guide indexed for this repository

Research direction

No files or tests are named. Start by tracing how the GitHub Action reads environment inputs and assembles README activity messages, then define the supported placeholders and fallback behavior for each event type. Done means users can configure the requested messages and the generated README entries use the configured templates.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, javascript
Domain
devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.