Skip to content

Bump browserify-sign from 4.2.1 to 4.2.2 in /ui-frontend/packages/admin #114

Bump browserify-sign from 4.2.1 to 4.2.2 in /ui-frontend/packages/admin

Bump browserify-sign from 4.2.1 to 4.2.2 in /ui-frontend/packages/admin #114

name: catalog-ui-search-dist-pr-onclose
on:
pull_request:
types: [closed]
jobs:
delete-branch:
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.head.repo.full_name == 'codice/ddf-ui' }}
steps:
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "16.x"
- name: Delete branch
uses: actions/github-script@v6
with:
script: |
const prNumber = context.payload.pull_request.number;
const branchName = `catalog-ui-search-dist-${prNumber}`;
try {
await github.rest.git.deleteRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `heads/${branchName}`
});
console.log(`Deleted branch ${branchName}`);
} catch (error) {
if (error.status === 404) {
console.log(`Branch ${branchName} not found`);
} else {
throw error;
}
}
- name: Add comment to pull request
uses: actions/github-script@v6
with:
script: |
const message = 'You can no longer use: \n `\"catalog-ui-search\": \"https://github.com/codice/ddf-ui#catalog-ui-search-dist-${{ github.event.pull_request.number }}\",` \n in your package.json to use this version in your project, as it has been deleted now that the pull request is closed. \n \n Instead, if the pr was merged you can now access these changes by using: \n `\"catalog-ui-search\": \"https://github.com/codice/ddf-ui#catalog-ui-search-dist-snapshot\",` \n \n Remember to use "yarn install --force" if you want to pick up changes to this version.';
const prNumber = context.payload.pull_request.number;
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
body: message
});