{"id":15760106,"url":"https://github.com/padupe/action-validate-param-pr","last_synced_at":"2025-03-31T09:14:50.370Z","repository":{"id":165618284,"uuid":"640981981","full_name":"padupe/action-validate-param-pr","owner":"padupe","description":"Action useful for validating the check-box in Pull Requests, or another strategy that conditions a certain action or scenario.","archived":false,"fork":false,"pushed_at":"2023-05-15T20:30:34.000Z","size":380,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-06T13:35:12.805Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/padupe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-15T14:25:48.000Z","updated_at":"2023-05-15T16:05:33.000Z","dependencies_parsed_at":"2023-07-19T14:31:13.231Z","dependency_job_id":null,"html_url":"https://github.com/padupe/action-validate-param-pr","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/padupe%2Faction-validate-param-pr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/padupe%2Faction-validate-param-pr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/padupe%2Faction-validate-param-pr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/padupe%2Faction-validate-param-pr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/padupe","download_url":"https://codeload.github.com/padupe/action-validate-param-pr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246443543,"owners_count":20778251,"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-10-04T10:41:06.666Z","updated_at":"2025-03-31T09:14:50.350Z","avatar_url":"https://github.com/padupe.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# action-validate-param-pr\n\n\u003e Documentation available in Portuguese (pt-BR) [here](./docs/README_pt-BR.md).\n\n## Index\n\n- [Description](#description)\n- [Flow](#flow)\n- [Requirements](#requirements)\n- [Use](#use)\n  - [GitHub App](#github-app)\n  - [Personal Access Token (PAT)](#personal-access-token-pat)\n- [Output](#output)\n- [Contribute to the Project](#contribute-to-the-project)\n\n## Description\n\nAction useful for validating the check-box in Pull Requests, or another strategy that conditions a certain action or scenario.\n\nFor example, an indication of the development of a new feature requires documentation to be updated.\n\n## Flow\n\n![Flow](./docs/assets/action-validate-param-pr.png)\n\n## Requirements\n\n- [GitHub](https://github.com/) token so that the action can carry out validation interactions via the [GitHub API](https://docs.github.com/en/rest?apiVersion=2022-11-28);\n\n- `conditionalValue`: Value of the conditional that must be \"fetched\" by the action;\n\n- `valueThatMustExist`: Value or condition that must exist.\n\n## Use\n\n### [GitHub App](https://docs.github.com/en/apps)\n\n1. Create directory `.github/worfklows` in the root of your project;\n\n2. Create file `validate-param-pr.yaml` with content similar to the following:\n\n\u003e NOTE: Check the guidelines for using the \"action-generate-token-github-app\" action by clicking [here](https://github.com/padupe/action-generate-token-github-app#requirements).\n\n```yaml\nname: Validate Param at Pull Request\non:\n  pull_request:\n    types: [opened, reopened, synchronize]\n    branches:\n      - main\n\njobs:\n  validate-param-pr:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Generate Token from GitHub App\n        id: generate-token-github-app\n        uses: padupe/action-generate-token-github-app@1.1.3\n        with:\n          appId: ${{ secrets.CREDENTIALS_GITHUB_APP_ID }}\n          installationId: ${{ secrets.CREDENTIALS_GITHUB_APP_INSTALLATION_ID }}\n          privateKey: ${{ secrets.CREDENTIALS_GITHUB_APP_PRIVATE_KEY }}\n\n      - name: Validate Param at Pull Request\n        uses: padupe/action-validate-param-pr@1.0.0\n        with:\n          gitHubToken: ${{ steps.generate-token-github-app.outputs.gitHubToken }}\n          conditionalValue: '[x] Release'\n          valueThatMustExist: '[x] Docs'\n```\n\n### Personal Access Token (PAT)\n\n1. Create directory `.github/worfklows` in the root of your project;\n\n2. Create file `validate-param-pr.yaml` with content similar to the following:\n\n```yaml\nname: Validate Param at Pull Request\non:\n  pull_request:\n    types: [opened, reopened, synchronize]\n    branches:\n      - main\n\njobs:\n  validate-param-pr:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Validate Param at Pull Request\n        uses: padupe/action-validate-param-pr@1.0.0\n        with:\n          gitHubToken: ${{ secrets.PAT_TOKEN }}\n          conditionalValue: '[x] Release'\n          valueThatMustExist: '[x] Docs'\n```\n\n## Output\n\nBoolean value.\n\n## Contribute to the Project\n\nCheck our [CONTRIBUTING](./CONTRIBUTING.md) guidelines.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpadupe%2Faction-validate-param-pr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpadupe%2Faction-validate-param-pr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpadupe%2Faction-validate-param-pr/lists"}