Skip to content

Commit

Permalink
Add a GitHub App client abstraction (#406)
Browse files Browse the repository at this point in the history
* Add production composer deps.

* Load Composer autoloader.

* Add the GitHub_App_Authorization client.
  • Loading branch information
dd32 committed Jun 20, 2023
1 parent 7336022 commit ebabecd
Show file tree
Hide file tree
Showing 5 changed files with 290 additions and 48 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- name: Install all dependencies
run: |
composer install
composer install --no-dev
npm install
- name: Build
Expand All @@ -28,6 +28,7 @@ jobs:
- name: Ignore .gitignore
run: |
git add mu-plugins/blocks/*/build/* --force
git add vendor --force
- name: Commit and push
# Using a specific hash here instead of a tagged version, for risk mitigation, since this action modifies our repo.
Expand Down
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
"url": "git@github.com:WordPress/wporg-repo-tools.git"
}
],
"require": {
"adhocore/jwt": "^1.0"
},
"require-dev": {
"composer/installers": "~1.0",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
Expand Down
151 changes: 104 additions & 47 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions mu-plugins/loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@

Autoload\register_class_path( __NAMESPACE__, __DIR__ );

// Composer loader.
if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
// Production.
require_once __DIR__ . '/vendor/autoload.php';
} elseif ( file_exists( dirname( __DIR__ ) . '/vendor/autoload.php' ) ) {
// Development.
require_once dirname( __DIR__ ) . '/vendor/autoload.php';
}

require_once __DIR__ . '/helpers/helpers.php';
require_once __DIR__ . '/blocks/global-header-footer/blocks.php';
require_once __DIR__ . '/blocks/horizontal-slider/horizontal-slider.php';
Expand Down
Loading

0 comments on commit ebabecd

Please sign in to comment.