GitXplorerGitXplorer
c

extract-zds

public
5 stars
0 forks
2 issues

Commits

List of commits on branch main.
Verified
d3fd4f5ea47c615b7e326677b8fdf8408769e63d

Merge pull request #23 from clarkbw/dependabot/npm_and_yarn/node-notifier-and-jest--removed

cclarkbw committed 2 years ago
Verified
88c99194c41bd2e5d9fb9eb32892447b45119371

Bump node-notifier and jest

ddependabot[bot] committed 2 years ago
Verified
eb3a1c1378ef1bee456a40c0109544b7ab13797e

Merge pull request #17 from clarkbw/dependabot/npm_and_yarn/minimatch-3.1.2

cclarkbw committed 2 years ago
Verified
bf4ac462874933b5a533f3b8257d0c6b740cabf9

Merge pull request #18 from clarkbw/dependabot/npm_and_yarn/ansi-regex-and-ansi-regex-4.1.1

cclarkbw committed 2 years ago
Verified
3bb57be95fe1f3b09ca391b596205254b06b7d2b

Bump minimatch from 3.0.4 to 3.1.2

ddependabot[bot] committed 2 years ago
Verified
748f9d6293f46ee41309a7153186f62d7993125c

Merge pull request #20 from clarkbw/dependabot/npm_and_yarn/minimist-and-minimist-and-mkdirp-1.2.7

cclarkbw committed 2 years ago

README

The README file for this repository.

What

This looks for all GitHub Zendesk references within an issue. It tries to find the github.zendesk.com domain based links.

This Action is for composability and doesn't take any action itself but outputs what it finds for you.

  • steps.id.outputs.length is the number of unique references
  • steps.id.outputs.zeds is the list of unique references in the format [ZD-670378,ZD-782708]

Why

Use this to auto-label issues with support references. The unique count of references can also be used to create a weighting system.

Usage

Here's an example that labels all Zendesk references.

name: Label all Zendesk References

on:
  issue_comment:
    types: [created, deleted, edited]
  issues:
    types: [opened, edited]

jobs:
  label-zed:
    runs-on: ubuntu-latest
    steps:
      - uses: clarkbw/extract-zds@main
        id: find-zds
        with:
          token: ${{secrets.GITHUB_TOKEN}}
      - name: Echo ZDs
        run: |
          echo "${{steps.find-zds.outputs.zeds}}"
      - uses: actions/github-script@v2
        if: steps.find-zds.outputs.length > 0
        with:
          github-token: ${{secrets.GITHUB_TOKEN}}
          script: |
            const issue = context.payload.issue;
            const zeds = ${{ steps.find-zds.outputs.zeds }};
            if (zeds.length <= 0) {
              return; // double checking there are no zeds
            }
            github.issues.addLabels({
              issue_number: issue.number,
              owner: context.repo.owner,
              repo: context.repo.repo,
              labels: ['support']
            })