-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Labels
Type: bugSomething isn't workingSomething isn't working
Description
Checks
- I use a supported version of Recent Activity.
- I searched the issues page for already existing bug reports.
Description
When updating recent activity, {AMOUNT} is undefined in commit push event.
Further investigation reveals that payload.size is not returned in the JSON data from actions-toolkit library.
Steps to reproduce
- Push code to a repository
- Execute github action to update README,md file
- Observe that push event reads "Pushed undefined commit(s) ..."
- In src/events/PushEvent.js, observe that {AMOUNT} is replaced by
item.payload.size - In src/index.js after line 30, log
eventDatato observe thatpayload.sizeis not returned in the JSON data from theactions-toolkitlibrary.
Configuration
Workflow file:
name: Update README Activity
on:
schedule:
- cron: "*/30 * * * *" # Runs every 30 minutes
workflow_dispatch: # Allows manual triggering
jobs:
recent-activity:
name: 'Update README with latest activity'
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/Checkout@v3
- name: 'Update README.md with recent activity'
uses: Readme-Workflows/recent-activity@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Recent Activity config file:
settings:
username: "romangrewal" # Replace with your username or comment out this line
commit_msg: "⚡ Update README with the recent activity"
max_lines: 100
whitelisted_events:
- comments
- create_repo
- fork
- issues
- issues_open
- issues_close
- member
- pr
- pr_open
- pr_merge
- pr_close
- push
- release
- review
- star
- wiki
url_text: "{REPO}{ID}"
commit_name: "readme-bot"
commit_email: "41898282+github-actions[bot]@users.noreply.github.com"
line_prefix: "{NUM}. "
messages:
comments: "💬 Commented on {ID} in {REPO}"
push: "⬆️ Pushed {AMOUNT} commit(s) to {REPO}"
issue_opened: "❗️ Opened issue {ID} in {REPO}"
issue_closed: "✔️ Closed issue {ID} in {REPO}"
pr_opened: "💪 Opened PR {ID} in {REPO}"
pr_closed: "❌ Closed PR {ID} in {REPO}"
pr_merged: "🎉 Merged PR {ID} in {REPO}"
create_repo: "📔 Created new repository {REPO}"
fork_repo: "🔱 Forked {FORK} from {REPO}"
wiki_create: "📖 Created new wiki page {WIKI} in {REPO}"
added_member: "🤝 Became collaborator on {REPO}"
changes_approved: "👍 Approved {ID} in {REPO}"
changes_requested: "🔴 Requested changes in {ID} in {REPO}"
new_release: "✌️ Released {ID} in {REPO}"
new_star: "⭐ Starred {REPO}"Expected behaviour
{AMOUNT} is replaced by commit count
Actual behaviour
{AMOUNT} is undefined
Failed runs
https://github.com/romangrewal/romangrewal/actions/runs/18661441352/job/53202631024
Metadata
Metadata
Assignees
Labels
Type: bugSomething isn't workingSomething isn't working