fastlane / github-actions

MIT License
75 stars 7 forks source link

Add `communicate-on-pull-request-merged` GitHub Action #14

Closed mollyIV closed 5 years ago

mollyIV commented 5 years ago

Description

The action will:

Please note that this is just an action implementation. It does not take any effect itself. A new workflow which uses the action will be created.

Testing

To test the changes, run unit tests by executing npm test (followed by npm install to install the package dependencies).

 PASS  __tests__/main.test.ts
  action test suite
    ✓ It posts a comment on a merged issue for (pull-request-closed.json) (1406ms)
    ✓ It does not post a comment on a closed pull request for (issue.json) (14ms)
    ✓ It does not post a comment on a closed pull request for (action-opened.json) (13ms)
    ✓ It does not post a comment on a closed pull request for (pull-request-closed-but-not-merged) (9ms)

Test Suites: 1 passed, 1 total
Tests:       4 passed, 4 total
Snapshots:   0 total
Time:        2.182s, estimated 3s
Ran all test suites.

I also tested the workflow on my private repo (comments from my personal account, because I set myself as a bot 😅):

image

🎊

If you want to test this action, here is the workflow to use:

name: Processing pull requests
on: 
  pull_request:
    types: [closed]

jobs:   
  pr-release-lifecycle:
    name: PR release lifecycle
    runs-on: ubuntu-latest    
    steps:
    - uses: actions/checkout@master
      with:
        ref: refs/heads/master
    - uses: mollyIV/github-actions/communicate-on-pull-request-merged@pr-release-lifecycle
      with:
        repo-token: "${{ secrets.GITHUB_TOKEN }}"

closes https://github.com/fastlane/github-actions/issues/12.

mollyIV commented 5 years ago

Oh, it's been merged already, don't you mind @janpio if I open another pull request and apply your suggestions there?

janpio commented 5 years ago

Oh, that overlapped.

Yes of course, consider all of them and create a new PR if useful/necessary.

mollyIV commented 5 years ago

The PR is ready for review: https://github.com/fastlane/github-actions/pull/16 @janpio 😊 🙇