Skip to content

Resolve Sentry Issues

Actions

About

Resolves linked Sentry issues opened by Github
v1
Latest
Star (0)

@kyosenergy/sentry-resolve-action

GitHub Super-Linter CI Check dist/ CodeQL Coverage

This action expands on Sentry's GitHub integration. Sentry's GitHub integration typically creates issues on GitHub with a reference to the Sentry issue. This action extracts the sentry issue links from GitHub issue's body, and sends a request to Sentry's API to resolve the issue.

Features:

  • Supports multi-line issue bodies and properly handles failures.
  • Tested with Jest, including success and failure scenarios.

Usage

To include the action in a workflow in another repository, you can use the uses syntax with the @ symbol to reference a specific branch, tag, or commit hash.

name: 'Resolve Sentry Issues on Issue Close'

on:
  issues:
    types: [closed]

jobs:
  resolve-sentry:
    runs-on: ubuntu-latest
    steps:
      - name: kyosenergy/sentry-resolve-action@v1
        with:
          # Sentry organization name
          org: evil-corp

          # Sentry User Auth Token with scopes: `event:read, event:write`.
          # It can be generated via https://{org}.sentry.io/settings/account/api/auth-tokens/
          token: ${{ secrets.SENTRY_TOKEN }}

License

The scripts and documentation in this project are released under the MIT License

Contributing

  1. 🛠️ Install the dependencies

    npm install
  2. 🏗️ Package the TypeScript for distribution

    npm run bundle
  3. ✅ Run the tests

    $ npm test
    
    PASS __tests__/main.test.ts (5.12 s)
      Resolve Sentry Issues Action
       ✓ should log 'No Sentry issues found' when no issues are present (3 ms)
       ✓ should throw an error if Sentry token is missing
       ✓ should perform a PUT request against sentry service (109 ms)
       ...
  4. (Optional) Test your action locally

    The @github/local-action utility can be used to test your action locally. It is a simple command-line tool that "stubs" (or simulates) the GitHub Actions Toolkit. This way, you can run your TypeScript action locally without having to commit and push your changes to a repository.

    The local-action utility can be run in the following ways:

    • Visual Studio Code Debugger

      Make sure to review and, if needed, update .vscode/launch.json

    • Terminal/Command Prompt

      # npx @github/local-action . src/main.ts .env
      npm run local-action

    You can provide a .env file to the local-action CLI to set environment variables used by the GitHub Actions Toolkit. For example, setting inputs and event payload data used by your action. For more information, see the example file, .env.example, and the GitHub Actions Documentation.

Resolve Sentry Issues is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Resolves linked Sentry issues opened by Github
v1
Latest

Resolve Sentry Issues is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.