{"id":15792304,"url":"https://github.com/levonet/ansible-ci-github-pr-description","last_synced_at":"2026-01-11T09:41:01.578Z","repository":{"id":67322354,"uuid":"148031308","full_name":"levonet/ansible-ci-github-pr-description","owner":"levonet","description":"Add build information to Pull Request description","archived":false,"fork":false,"pushed_at":"2019-12-23T19:17:58.000Z","size":7,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-11T23:07:00.080Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://galaxy.ansible.com/levonet/ci_github_pr_description","language":null,"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/levonet.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-09T14:04:32.000Z","updated_at":"2019-12-23T19:18:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"f9215c3a-c486-46ed-92e1-239c82b35911","html_url":"https://github.com/levonet/ansible-ci-github-pr-description","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"17f45b768f9074613cf673987cbf32ff07031f9e"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levonet%2Fansible-ci-github-pr-description","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levonet%2Fansible-ci-github-pr-description/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levonet%2Fansible-ci-github-pr-description/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levonet%2Fansible-ci-github-pr-description/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/levonet","download_url":"https://codeload.github.com/levonet/ansible-ci-github-pr-description/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246523896,"owners_count":20791444,"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-04T23:01:25.261Z","updated_at":"2026-01-11T09:41:01.532Z","avatar_url":"https://github.com/levonet.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# CI: Add build information to Pull Request\n[![Build Status](https://travis-ci.org/levonet/ansible-ci-github-pr-description.svg?branch=master)](https://travis-ci.org/levonet/ansible-ci-github-pr-description)\n\nAdd build information to Pull Request description.\n\n## Role Variables\n\n- `ci_github_api` (default: https://api.github.com)\n- `ci_github_username` (required): Github username.\n- `ci_github_password` (required): [Github access token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/).\n- `ci_github_owner` (required): Github owner or organisation name.\n- `ci_github_repo` (required): Github project repository name.\n- `ci_github_pr_number` (required): Github Pull Request number.\n- `ci_github_branch` (optional): Github branch name.\n- `ci_github_jira_task_url` (optional): Github repository url.\n- `ci_github_jira_task_filter` (optional): Regexp filter for Jira task from github branch.  \n  For example: `(TODO|BUGS)-\\d+`.\n- `ci_github_message_body` (required): Some text messages with CI information.\n- `ci_github_message_id` (optional): Unique text messages id. It needs if in a Pull Request description has more than one message.\n\n## Example Playbook\n\n```yaml\n- hosts: 127.0.0.1\n  connection: local\n  gather_facts: no\n  vars:\n    ci_github_username: ci-bot\n    ci_github_password: secret\n    ci_github_branch: \"{{ github_branch }}\"\n    ci_github_pr_number: \"{{ github_pr_number }}\"\n    ci_github_owner: myorg\n    ci_github_repo: myapp\n    ci_github_jira_task_filter: (MYAPPAPI|MYAPPDB|BUGS)-\\d+\n    ci_github_jira_task_url: https://myorg.atlassian.net/browse/\n    ci_github_message_body: |\n      * App: [pr-{{ ci_github_pr_number }}.myapp.myorg.com|http://pr-{{ ci_github_pr_number }}.myapp.myorg.com]\n      * Logs: [myapp-PR-{{ ci_github_pr_number }}|http://grafana.myorg.com/d/XxXxXx/logs?var-host=sandbox1\u0026var-app=myapp-PR-{{ ci_github_pr_number }}]\n      * Jenkins: [PR-{{ ci_github_pr_number }}|http://jenkins.myorg.com/job/myapp/view/change-requests/job/PR-{{ ci_github_pr_number }}/]\n  roles:\n    - role: levonet.ci_github_pr_description\n```\n\nAnd run in Jenkins:\n\n```bash\nansible-playbook myplaybook.yml -e github_branch=\"${CHANGE_BRANCH}\" -e github_pr_number=\"${CHANGE_ID}\"\n```\n\nAs a result, you will receive a description in Pull Request:\n\n\u003e Old description information if exists\n\u003e * Jira: [TODO-40](#)\n\u003e * App: [pr-115.myapp.myorg.com](#)\n\u003e * Logs: [myapp-PR-115](#)\n\u003e * Jenkins: [PR-115](#)\n\n## License\n\n[MIT](https://opensource.org/licenses/MIT)\n\n## Author Information\n\nThis role was created by [Pavlo Bashynskyi](https://github.com/levonet)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevonet%2Fansible-ci-github-pr-description","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flevonet%2Fansible-ci-github-pr-description","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevonet%2Fansible-ci-github-pr-description/lists"}