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

Use GH CLI instead of community actions #8063

Merged
merged 6 commits into from
Mar 17, 2022
Merged

Conversation

roryabraham
Copy link
Contributor

@roryabraham roryabraham commented Mar 10, 2022

Details

This should solve the linked issue by removing the use of the pascalgn/automerge-action community action. The GH CLI will exit with a non-zero status code if something doesn't happen as expected.

I also removed other similarly unnecessary community actions both for consistency and because of what @rafecolton said here

We could continue making similar changes throughout our GH Actions code (and I think it would be a good idea to do that incrementally), but I thought this was a sufficient for now because it can be tested pretty easily.

Fixed Issues

$ #6789

Tests

I did a fair amount of local testing using the GH CLI and https://github.com/Andrew-Test-Org/Public-Test-Repo to validate these changes. I also validated that you can set a workflow-level environment variable, override it in just one step, and that doesn't affect other steps (they still get the workflow-level environment variable.

PR Review Checklist

Contributor (PR Author) Checklist

  • I verified the PR has a small number of commits behind main
  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I clearly indicated the environment tests should be run in (Staging vs Production)
  • I wrote testing steps that cover success & fail scenarios (if applicable)
  • I included screenshots or videos for tests on all platforms
  • I ran the tests & veryfy they passed on:
    • iOS / native
    • Android / native
    • iOS / Safari
    • Android / Chrome
    • MacOS / Chrome
    • MacOS / Desktop
  • I verified there are no console errors related to changes in this PR
  • I followed proper code patterns (see Reviewing the code)
    • I added comments when the code was not self explanatory
    • I put all copy / text shown in the product in all src/languages/* files (if applicable)
    • I followed proper naming convention for platform-specific files (if applicable)
    • I followed style guidelines (in Styling.md) for all style edits I made
    • I followed the JSDocs style guidelines (in STYLE.md)
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I corroborated the UI performance was not affected (the performance is the same than main branch)
  • If I created a new component I verified that a similar component doesn't exist in the codebase

PR Reviewer Checklist

  • I verified the PR has a small number of commits behind main
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the testing environment is mentioned in the test steps
  • I verified testing steps cover success & fail scenarios (if applicable)
  • I checked that screenshots or videos are included for tests on all platforms
  • I verified tests pass on all platforms & I tested again on:
    • iOS / native
    • Android / native
    • iOS / Safari
    • Android / Chrome
    • MacOS / Chrome
    • MacOS / Desktop
  • I verified there are no console errors related to changes in this PR
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified comments were added when the code was not self explanatory
    • I verified any copy / text shown in the product was added in all src/languages/* files (if applicable)
    • I verified proper naming convention for platform-specific files was followed (if applicable)
    • I verified style guidelines were followed
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components are not impacted by changes in this PR (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified the UI performance was not affected (the performance is the same than main branch)
  • If a new component is created I verified that a similar component doesn't exist in the codebase

QA Steps

Merge this PR with the CP staging label. That will test both the updatedProtectedBranch workflow and the cherryPick workflow.

@roryabraham roryabraham requested a review from a team as a code owner March 10, 2022 00:01
@roryabraham roryabraham self-assigned this Mar 10, 2022
@github-actions
Copy link
Contributor

⚠️ ⚠️ Heads up! This pull request has the CP Staging label. ⚠️ ⚠️
Merging it will cause it to be immediately deployed to staging, even if the open StagingDeployCash deploy checklist is locked.

@MelvinBot MelvinBot requested review from joelbettner and removed request for a team March 10, 2022 00:01
@roryabraham roryabraham requested a review from deetergp March 10, 2022 00:03
@roryabraham
Copy link
Contributor Author

Tagging in @deetergp since he's pretty familiar with GitHub Actions stuff at this point.

@roryabraham roryabraham requested a review from AndrewGable March 10, 2022 00:06
deetergp
deetergp previously approved these changes Mar 11, 2022
Copy link
Contributor

@deetergp deetergp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've only used the gh CLI tool for checkout PRs on our contributors' forked repos, I didn't realize it was this powerful. Very nic!

joelbettner
joelbettner previously approved these changes Mar 11, 2022
Copy link
Contributor

@joelbettner joelbettner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM, but I'll DEFINITELY defer to @deetergp and @AndrewGable as I'm not very familiar with this at all.

@roryabraham
Copy link
Contributor Author

@AndrewGable Updated and ready for re-review.

@AndrewGable AndrewGable merged commit 3af29ff into main Mar 17, 2022
@AndrewGable AndrewGable deleted the Rory-LoudFailAutomergeAction branch March 17, 2022 21:16
OSBotify pushed a commit that referenced this pull request Mar 17, 2022
Use GH CLI instead of community actions

(cherry picked from commit 3af29ff)
OSBotify added a commit that referenced this pull request Mar 17, 2022
@roryabraham
Copy link
Contributor Author

Nice, seems this worked like a charm ☘️

@OSBotify
Copy link
Contributor

🚀 Cherry-picked to staging by @AndrewGable in version: 1.1.44-1 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants