Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Added Monorepo Merge Notice Workflow
Browse files Browse the repository at this point in the history
This workflow leaves a comment and closes any pull requests
or issues that have been opened in
the repository.
  • Loading branch information
ObliviousHarmony committed Dec 8, 2023
1 parent d976360 commit e24ca4a
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/monorepo-merge-notices.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: 'Monorepo Merge Notices'
on:
pull_request:
types: [ 'opened' ]
issues:
types: [ 'opened' ]
jobs:
issue_block:
name: 'Block Issues & Pull Requests'
runs-on: 'ubuntu-latest'
steps:
- name: 'Add Merge Notice'
uses: 'actions/github-script@v5'
with:
script: |
github.rest.issues.createComment( {
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'We have merged WooCommerce Blocks into the WooCommerce monorepo. Please open any issues or pull requests \
in the woocommerce/woocommerce repository.'
} );
- name: 'Close'
uses: 'actions/github-script@v5'
with:
script: |
octokit.rest.issues.update({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
state: 'closed'
});

0 comments on commit e24ca4a

Please sign in to comment.