Skip to content

Conversation

@toffentoffen
Copy link
Contributor

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

Fixes #27

@toffentoffen
Copy link
Contributor Author

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

Copy link
Contributor

@miguelbemartin miguelbemartin left a comment

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
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
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enrich the information when a PR is opened/closed

3 participants