Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project automation: Rewrite actions using JavaScript #17080

Merged
merged 8 commits into from Aug 22, 2019

Conversation

@noisysocks
Copy link
Member

commented Aug 19, 2019

Replaces all of our Docker container actions with a single JavaScript action.

This has a few benefits:

  • Easier to understand: Gutenberg is primarily a JavaScript application, and we're all primarily JavaScript developers, so it makes sense to use what we know.
  • More performant: According to the docs, JavaScript actions run faster than Docker container actions.
  • Testable: We can use our existing jest setup to write unit tests for our actions.
  • Less noise: By replacing 3 actions with 1 action, we'll have 1/3 as many 'checks' appear at the bottom of each PR.

Docs: https://help.github.com/en/categories/automating-your-workflow-with-github-actions

@noisysocks noisysocks requested a review from talldan Aug 19, 2019
@noisysocks noisysocks changed the title GitHub Actions: Rewrite actions using JavaScript Project automation: Rewrite actions using JavaScript Aug 19, 2019
@noisysocks noisysocks force-pushed the update/use-javascript-actions branch from 21cbdad to d4ca647 Aug 19, 2019
@noisysocks

This comment has been minimized.

Copy link
Member Author

commented Aug 19, 2019

Yay, it works!

I'm pretty happy with where this is at, although I'd like to remove the npm install and npm run build:packages steps since they're so slow.

What do you think, @talldan?

package.json Show resolved Hide resolved
Copy link
Contributor

left a comment

Love this, introduces a really nice scaffolding to add more automation to PRs, and ensures there won't be any extra noise if we do. ❤️

I'd be happy to see it merged and have smaller follow up PRs address the comments.

Copy link
Contributor

left a comment

Nice work here 🎉

@noisysocks noisysocks force-pushed the update/use-javascript-actions branch from c2ed9f9 to 3c22f92 Aug 22, 2019
@noisysocks

This comment has been minimized.

Copy link
Member Author

commented Aug 22, 2019

@talldan @youknowriad: Pretty happy with this now! Have moved a few things around so will need another review.

  • I renamed the package from pull-request-automation to project-management-automation in anticipation of future tasks that might do more than just manage pull requests.
  • I'm running npm install inside the action's directory which makes the action run a lot faster.
  • I removed Babel transpilation from the package which makes the action run a lot faster.
  • I added lots of logging which should help us work out out what's going wrong/on.
  • I refactored the code that invokes our different tasks so that it's easier to add new ones.
  • I fixed a mistake where I was looking at context.action instead of context.payload.action 🙄
Copy link
Contributor

left a comment

Double approving!

@noisysocks noisysocks merged commit 47dfd82 into master Aug 22, 2019
2 checks passed
2 checks passed
pull-request-automation
Details
Travis CI - Pull Request Build Passed
Details
@noisysocks noisysocks deleted the update/use-javascript-actions branch Aug 22, 2019
donmhico added a commit to donmhico/gutenberg that referenced this pull request Aug 27, 2019
* Project automation: Rewrite actions using JavaScript

* Project automation: Don't transpile or install all dependencies

* Project automation: pull-request-automation -> project-management-automation

* Project automation: Add explanatory comment for `npm install` hack

* Project automation: Add debug statements

* Project automation: Don't use GitHub's debug() function

* Project automation: Use `payload` in tasks, not `context`

* Project automation: Link to the relevant GitHub documentation
gziolo added a commit that referenced this pull request Aug 29, 2019
* Project automation: Rewrite actions using JavaScript

* Project automation: Don't transpile or install all dependencies

* Project automation: pull-request-automation -> project-management-automation

* Project automation: Add explanatory comment for `npm install` hack

* Project automation: Add debug statements

* Project automation: Don't use GitHub's debug() function

* Project automation: Use `payload` in tasks, not `context`

* Project automation: Link to the relevant GitHub documentation
gziolo added a commit that referenced this pull request Aug 29, 2019
* Project automation: Rewrite actions using JavaScript

* Project automation: Don't transpile or install all dependencies

* Project automation: pull-request-automation -> project-management-automation

* Project automation: Add explanatory comment for `npm install` hack

* Project automation: Add debug statements

* Project automation: Don't use GitHub's debug() function

* Project automation: Use `payload` in tasks, not `context`

* Project automation: Link to the relevant GitHub documentation
daniloercoli added a commit that referenced this pull request Sep 4, 2019
 into rnmobile/add-autosave-to-mobile

* 'rnmobile/master' of https://github.com/WordPress/gutenberg: (52 commits)
  [RNMobile] DarkMode improvements (#17309)
  Remove redundant bg color within button appender (#17325)
  Support group block on mobile (#17251)
  [RNMobile] Insure tapping at end of post inserts at end
  Recover border colors (#17269)
  [RNMobile] Fix dismiss keyboard button for the post title (#17260)
  Unify media placeholder and upload props within media-text (#17268)
  MediaUpload and MediaPlaceholder unify props (#17145)
  Add native support for the MediaText block (#16305)
  Activate Travis CI on rnmobile/master branch (#17229)
  [RNMobile] Native mobile release v1.11.0 (#17181)
  Apply box-sizing border-box properly to the notices components (#17066)
  Writing Flow: allow undo of patterns with BACKSPACE and ESC (#14776)
  Project automation: Rewrite actions using JavaScript (#17080)
  Build: remove global install of latest npm since we want to use the paired node/npm version (#17134)
  Writing Flow/Quote: allow splitting (#17121)
  Use `400` as a valid `font-weight`
  Add: Disabled block count in the block manager (#17103)
  Update video player style on mobile - Add a new gridicon play icon, from: https://github.com/Automattic/gridicons/blob/87c9fce08b4a9f184b9fb4963228757fdd4f4e74/svg-min/gridicons-play.svg - Replace the Dashicon play by this one - Update icon size and icon color - Update the overlay color
  [RNMobile] Hide replaceable block when adding block (#16931)
  ...

# Conflicts:
#	packages/block-editor/src/components/block-list/index.native.js
#	packages/block-editor/src/components/inserter/index.native.js
#	packages/block-editor/src/components/inserter/menu.native.js
#	packages/block-editor/src/components/media-placeholder/index.native.js
#	packages/block-editor/src/components/warning/index.native.js
#	packages/block-library/src/code/edit.native.js
#	packages/block-library/src/image/edit.native.js
#	packages/block-library/src/missing/edit.native.js
#	packages/block-library/src/more/edit.native.js
#	packages/block-library/src/nextpage/edit.native.js
#	packages/block-library/src/video/edit.native.js
#	packages/components/src/mobile/bottom-sheet/cell.native.js
#	packages/components/src/mobile/bottom-sheet/index.native.js
#	packages/components/src/mobile/dark-mode/index.native.js
#	packages/components/src/mobile/html-text-input/index.native.js
#	packages/components/src/toolbar/toolbar-container.native.js
#	packages/edit-post/src/components/header/header-toolbar/index.native.js
#	packages/edit-post/src/components/layout/index.native.js
#	packages/edit-post/src/components/visual-editor/index.native.js
#	packages/rich-text/src/component/index.native.js
dd32 pushed a commit to dd32/gutenberg that referenced this pull request Sep 27, 2019
* Project automation: Rewrite actions using JavaScript

* Project automation: Don't transpile or install all dependencies

* Project automation: pull-request-automation -> project-management-automation

* Project automation: Add explanatory comment for `npm install` hack

* Project automation: Add debug statements

* Project automation: Don't use GitHub's debug() function

* Project automation: Use `payload` in tasks, not `context`

* Project automation: Link to the relevant GitHub documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.