Skip to content

Bump qs and express #27

Bump qs and express

Bump qs and express #27

Workflow file for this run

name: Check for assets
on:
issues:
types: [opened, edited]
issue_comment:
types: [created, edited]
pull_request:
types: [opened, edited]
jobs:
check-assets:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Check for assets
uses: actions/github-script@v5
with:
script: |
const issueOrPrBody = context.payload.issue?.body || context.payload.pull_request?.body || context.payload.comment?.body;
if (issueOrPrBody.includes('/assets')) {
const fs = require('fs');
const dateCreated = new Date().toISOString();
const author = context.payload.sender.login;
const issueOrPrLink = context.payload.issue?.html_url || context.payload.pull_request?.html_url;
const commentLink = context.payload.comment?.html_url;
const repoName = context.repo.repo;
fs.writeFileSync('assets.txt', `Date created: ${dateCreated}\nAuthor: ${author}\nIssue/PR link: ${issueOrPrLink}\nComment link: ${commentLink}\nRepo name: ${repoName}`);
}
- name: Upload assets.txt
uses: actions/upload-artifact@v2
with:
name: assets.txt
path: ./assets.txt