{"id":13532671,"url":"https://github.com/machine-learning-apps/actions-chatops","last_synced_at":"2025-04-01T21:30:49.912Z","repository":{"id":38151488,"uuid":"212594276","full_name":"machine-learning-apps/actions-chatops","owner":"machine-learning-apps","description":"Actions That Enables ChatOps In a PR Through a GitHub App","archived":true,"fork":false,"pushed_at":"2022-12-08T03:13:44.000Z","size":103,"stargazers_count":75,"open_issues_count":11,"forks_count":9,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-07T12:02:19.511Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/machine-learning-apps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-03T13:58:55.000Z","updated_at":"2025-02-27T11:03:41.000Z","dependencies_parsed_at":"2023-01-04T18:30:18.661Z","dependency_job_id":null,"html_url":"https://github.com/machine-learning-apps/actions-chatops","commit_stats":{"total_commits":86,"total_committers":7,"mean_commits":"12.285714285714286","dds":0.2093023255813954,"last_synced_commit":"1111971f984760aa3364eb0361da51274e117aed"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/machine-learning-apps%2Factions-chatops","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/machine-learning-apps%2Factions-chatops/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/machine-learning-apps%2Factions-chatops/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/machine-learning-apps%2Factions-chatops/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/machine-learning-apps","download_url":"https://codeload.github.com/machine-learning-apps/actions-chatops/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246712941,"owners_count":20821820,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T07:01:12.756Z","updated_at":"2025-04-01T21:30:49.598Z","avatar_url":"https://github.com/machine-learning-apps.png","language":"Python","readme":"![Actions Status](https://github.com/machine-learning-apps/actions-chatops/workflows/Tests/badge.svg)\n\n# Trigger Actions With ChatOps on Pull Requests\n\n\nThis action helps you trigger downstream actions with a custom command made via a comment in a pull request, otherwise known as [ChatOps](https://www.pagerduty.com/blog/what-is-chatops/).  \n\nOptionally, you may provide credentials to authenticate as a GitHub App and label an issue once a trigger phrase is detected.  Having another app other than the GitHub Action apply a label allows you to create a label event to trigger downstream Actions (since an Action cannot create events that trigger other Actions).\n\n\n## Example Usage\n\n```yaml\nname: Demo\non: [issue_comment]\n\njobs:\n  label-pr:\n    runs-on: ubuntu-latest\n    steps:\n      - name: listen for PR Comments\n        uses: machine-learning-apps/actions-chatops@master\n        with:\n          APP_PEM: ${{ secrets.APP_PEM }}\n          APP_ID: ${{ secrets.APP_ID }}\n          TRIGGER_PHRASE: \"/test-trigger-comment\"\n          INDICATOR_LABEL: \"test-label\"\n        env: # you must supply GITHUB_TOKEN\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        id: prcomm\n        # This step clones the branch of the PR associated with the triggering phrase, but only if it is triggered.\n      - name: clone branch of PR\n        if: steps.prcomm.outputs.BOOL_TRIGGERED == 'true'\n        uses: actions/checkout@master\n        with:\n          ref: ${{ steps.prcomm.outputs.SHA }}\n\n        # This step is a toy example that illustrates how you can use outputs from the pr-command action\n      - name: print variables\n        if: steps.prcomm.outputs.BOOL_TRIGGERED == 'true'\n        run: echo \"${USERNAME} made a triggering comment on PR# ${PR_NUMBER} for ${BRANCH_NAME}\"\n        env: \n          BRANCH_NAME: ${{ steps.prcomm.outputs.BRANCH_NAME }}\n          PR_NUMBER: ${{ steps.prcomm.outputs.PULL_REQUEST_NUMBER }}\n          USERNAME: ${{ steps.prcomm.outputs.COMMENTER_USERNAME }}\n```\n\n\n## Mandatory Inputs\n\n  - `TRIGGER_PHRASE`: this is the phrase in a PR comment that you want to trigger downstream Actions.  Example - \"/deploy-app-test\"\n\n## Optional Inputs\n\n  If one of the below three arguments are provided, all three must be present. \n\n  - `INDICATOR_LABEL`: label that will be added to the PR if a triggering comment is detected.  This is used to trigger downstream Actions with the right context of the PR.\n\n  - `APP_PEM`: description: string version of your PEM file used to authenticate as a GitHub App.  _This is required if the input INDICATOR_LABEL is supplied._\n\n  - `APP_ID`:your GitHub App ID. _This is required if the input INDICATOR_LABEL is supplied._\n\n  - `TEST_EVENT_PATH`: An alternate place to fetch the payload for testing and debugging when making changes to this Action.  This is set to the system environment variable $GITHUB_EVENT_PATH by default.\n\n\n## Outputs\n\n - `TRAILING_LINE`: the text that immediately follows the triggering phrase that is on the same line.  For example,  \"/trigger-phrase foo bar\\n next line\" will emit the value \"foo bar\" This is intended to be used as arguments for downstream actions.\n\n - `TRAILING_TOKEN`: this is the next token that immediately follows the triggering phrase that is on the same line.  For example,  \"/trigger-phrase foo bar\" will emit the value \"foo\". This is intended to be used as arguments for downstream actions.\n\n - `PULL_REQUEST_NUMBER`: the number of the pull request\n\n - `COMMENTER_USERNAME`: The GitHub username of the person that made the triggering comment in the PR.\n\n - `BRANCH_NAME`: The name of the branch corresponding to the PR.\n\n - `SHA`: The SHA of the branch on the PR at the time the triggering comment was made.\n\n - `BOOL_TRIGGERED`: true or false depending on if the trigger phrase was detected and this is a pull request.\n\n - `APP_INSTALLATION_TOKEN`: The [installation access token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) for the GitHub App corresponding to the current repository.  This is only retrieved if the `APP_PEM` and `APP_ID` inputs are supplied.\n \n ## Keywords\n MLOps, Machine Learning, Data Science\n","funding_links":[],"categories":["Community Resources","Python"],"sub_categories":["Pull Requests"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmachine-learning-apps%2Factions-chatops","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmachine-learning-apps%2Factions-chatops","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmachine-learning-apps%2Factions-chatops/lists"}