{"id":20406697,"url":"https://github.com/xwp/wp-github-pull-request-travis-ci-trac-sync","last_synced_at":"2025-04-12T15:08:05.545Z","repository":{"id":66346540,"uuid":"47471403","full_name":"xwp/wp-github-pull-request-travis-ci-trac-sync","owner":"xwp","description":"Sync from GitHub Pull Requests to WordPress Trac via Travis CI (see Trac #34694)","archived":false,"fork":false,"pushed_at":"2015-12-06T14:42:49.000Z","size":26,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-12T15:08:00.688Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/xwp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-05T20:25:02.000Z","updated_at":"2020-02-15T10:41:35.000Z","dependencies_parsed_at":"2023-02-21T18:15:09.200Z","dependency_job_id":null,"html_url":"https://github.com/xwp/wp-github-pull-request-travis-ci-trac-sync","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwp%2Fwp-github-pull-request-travis-ci-trac-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwp%2Fwp-github-pull-request-travis-ci-trac-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwp%2Fwp-github-pull-request-travis-ci-trac-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwp%2Fwp-github-pull-request-travis-ci-trac-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xwp","download_url":"https://codeload.github.com/xwp/wp-github-pull-request-travis-ci-trac-sync/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248586234,"owners_count":21128997,"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-11-15T05:18:48.710Z","updated_at":"2025-04-12T15:08:05.526Z","avatar_url":"https://github.com/xwp.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sync from GitHub Pull Requests to WordPress Trac via Travis CI\n\nThis script facilitates contributing to WordPress Core via GitHub Pull Requests. See WordPress Trac [#34694](https://core.trac.wordpress.org/ticket/34694).\n\n_Caveat:_ This is intended for users in trusted contributor teams as it requires the user\nto open open an internal (intra-repo) pull request from feature branch to `master`.\nIt will not work when opening a pull request from a fork due to Travis CI's [security restrictions](https://docs.travis-ci.com/user/pull-requests#Security-Restrictions-when-testing-Pull-Requests)\non environment variables. So any pull requests from external contributors will\nneed to be manually applied to a feature branch by a repo contributor and then\nopen an intra-repo pull request (while closing the original inter-repo pull request).\n\n## Installation\n\n1. Clone the `develop.git.wordpress.org` repo onto GitHub and enable Travis CI for it. See instructions in [Contributing to WordPress Core via GitHub](https://make.xwp.co/2015/10/29/contributing-to-wordpress-core-via-github/).\n2. Create a bot user on WordPress.org (e.g. `xwp-bot`) and request that the `XML_RPC` privilege be granted for that user.\n3. Ensure the patch from Trac [#34694](https://core.trac.wordpress.org/ticket/34694) is applied to WordPress Core; if not already upstreamed, make it the first commit to each feature branch.\n4. Edit the Travis CI settings for your WordPress GitHub clone to add the following environment variables:\n * `WP_TRAVISCI_CUSTOM_BEFORE_INSTALL_SRC`: https://raw.githubusercontent.com/xwp/wp-github-pull-request-travis-ci-trac-sync/master/travis.before_install.sh\n * `WP_TRAVISCI_CUSTOM_SCRIPT_SRC`: https://raw.githubusercontent.com/xwp/wp-github-pull-request-travis-ci-trac-sync/master/travis.script.sh\n * `WP_TRAVISCI_CUSTOM_AFTER_SCRIPT_SRC`: https://raw.githubusercontent.com/xwp/wp-github-pull-request-travis-ci-trac-sync/master/travis.after_script.sh\n * `WPORG_USERNAME`: Use the Trac bot user you created.\n * `WPORG_PASSWORD`: Use password for Trac bot user, and make sure added with “Display value in build log” _off_.\n\nFor more information, see [Streamlining Contributions to WordPress Core via GitHub](https://make.xwp.co/2015/12/05/streamlining-contributions-to-wordpress-core-via-github/).\n\n## Usage\n\nOnce configured, a developer with write access to the GitHub repo can contribute to WordPress Core as follows:\n\n0. Ensure that a [Trac](https://core.trac.wordpress.org/) ticket exists.\n1. Push commits to a feature branch on GitHub named after the Trac ticket (e.g. `trac-12345`).\n2. Open pull request to `master`; this must be an _internal_ (intra-repo) pull request, not from a fork (inter-repo).\n3. Watch Travis CI run its tests, and when completed look at Trac to see the patch uploaded.\n\nAs a bonus, the changes in the pull request will also have the following checks run:\n\n* Modified PHP files will be checked for syntax errors.\n* PHP changes will be checked with PHP_CodeSniffer against the `WordPress-Core` and `WordPress-Docs` standards.\n* JS changes will be checked with JSCS against the `wordpress` preset.\n\nNote that if there are no PHP files modified in a pull request, the *PHPUnit tests will be skipped altogether*, _drastically_ speeding up the build time.\n\n## Background\n\nFor the initial post that describes the approach, as linked above, see [Streamlining Contributions to WordPress Core via GitHub](https://make.xwp.co/2015/12/05/streamlining-contributions-to-wordpress-core-via-github/).\n\nFor a prior post describing the manual workflow that is being streamlined here, also as linked above, see [Contributing to WordPress Core via GitHub](https://make.xwp.co/2015/10/29/contributing-to-wordpress-core-via-github/).\n\nSee also the WordPress Trac [#34694](https://core.trac.wordpress.org/ticket/34694): Facilitate automated testing in context of pull requests and diffs.\n\n## Credits\n\nWritten by Weston Ruter ([westonruter](https://profiles.wordpress.org/westonruter)), [XWP](https://xwp.co/).\n\nThe functionality incorporates logic from [`trac-attach.sh`](https://gist.github.com/nacin/4758127) by Andrew Nacin ([nacin](https://profiles.wordpress.org/nacin)) and Michael Adams ([mdawaffe](https://profiles.wordpress.org/mdawaffe/)).\n\nLicense GPLv2.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxwp%2Fwp-github-pull-request-travis-ci-trac-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxwp%2Fwp-github-pull-request-travis-ci-trac-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxwp%2Fwp-github-pull-request-travis-ci-trac-sync/lists"}