Skip to content

Add PR stats to open/closed pull request comment - #31

Merged
miguelbemartin merged 6 commits into
masterfrom
enrich_pr_info
Nov 8, 2020
Merged

miguelbemartin merged 6 commits into
masterfrom
enrich_pr_info

Conversation

@toffentoffen

Copy link
Copy Markdown
Contributor
  • Created new function to extract stats from pr.
  • Enhanced open and close pr comments with those stats.

Fixes #27

@toffentoffen

Copy link
Copy Markdown
Contributor Author

Ensure this projects runs was executed successfully, but the check seems that doesn't picked up the response.

@miguelbemartin miguelbemartin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an error when executing the pipeline:

| /src/teamwork.sh: line 47: pr_stats_array[1]: unbound variable

@toffentoffen

Copy link
Copy Markdown
Contributor Author

Finally was able to run the test after upgrading my docker for mac:

act pull_request -e tests/events/pull_request_opened.json
[teamwork/Ensure this project runs] 🚀  Start image=node:12.6-buster-slim
[teamwork/Ensure this project runs]   🐳  docker run image=node:12.6-buster-slim entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[teamwork/Ensure this project runs]   🐳  docker cp src=/Users/marcnavarro/teamwork/github-sync/. dst=/github/workspace
[teamwork/Ensure this project runs] ⭐  Run actions/checkout@v1
[teamwork/Ensure this project runs]   ✅  Success - actions/checkout@v1
[teamwork/Ensure this project runs] ⭐  Run ./
[teamwork/Ensure this project runs]   🐳  docker build -t act-github-sync:latest /Users/marcnavarro/teamwork/github-sync
[teamwork/Ensure this project runs]   🐳  docker run image=act-github-sync:latest entrypoint=[] cmd=["" "localhost" "test_api_token"]
| --------------
| Running the process...
| --------------
| Event: pull_request - Action: opened
| --------------
| Task found with the id: 123
| --------------
| Test - Simulate request. Task ID: 123 - Comment:
|   **username** opened a PR: **This is an example of a title for the PR.**
|   [https://github.com/teamwork/github-sync/pull/1](https://github.com/teamwork/github-sync/pull/1)
|   ---
|   Stats: 1 commits, 4 files changed, +2, -3
|
| --------------
| Task found with the id: 456
| --------------
| Test - Simulate request. Task ID: 456 - Comment:
|   **username** opened a PR: **This is an example of a title for the PR.**
|   [https://github.com/teamwork/github-sync/pull/1](https://github.com/teamwork/github-sync/pull/1)
|   ---
|   Stats: 1 commits, 4 files changed, +2, -3
|
[teamwork/Ensure this project runs]   ✅  Success - ./
@miguelbemartin

Copy link
Copy Markdown
Contributor

@toffentoffen updated some minor style for the comments and it is ready to be merged.

Thanks for the effort working on this one :)

@miguelbemartin miguelbemartin self-assigned this Nov 8, 2020
@miguelbemartin
miguelbemartin merged commit 06e6254 into master Nov 8, 2020
@miguelbemartin
miguelbemartin deleted the enrich_pr_info branch November 8, 2020 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants