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

chore: use GITHUB_TOKEN to create sync PRs #3360

Merged

Conversation

brian-smith-tcril
Copy link
Contributor

@brian-smith-tcril brian-smith-tcril commented Dec 12, 2024

Description

We were using the same token to create and approve the sync PRs, leading to

Error: Unprocessable Entity: "Can not approve your own pull request". This typically happens when you try to approve the pull request with the same user account that created the pull request. Try using the built-in `${{ secrets.GITHUB_TOKEN }}` token, or if you're using a personal access token, use one that belongs to a dedicated bot account.

This isn't an issue for https://github.com/openedx/paragon/blob/release-23.x/.github/workflows/analyze-dependents.yml, which uses https://github.com/peter-evans/create-pull-request as opposed to https://github.com/TreTuna/sync-branches

https://github.com/peter-evans/create-pull-request has token as optional, and has the default documented as GITHUB_TOKEN

This PR updates the sync workflow to create PRs using secrets.GITHUB_TOKEN, while keeping the approval token the same.

Deploy Preview

Include a direct link to your changes in this PR's deploy preview here (e.g., a specific component page).

Merge Checklist

  • If your update includes visual changes, have they been reviewed by a designer? Send them a link to the Netlify deploy preview, if applicable.
  • Does your change adhere to the documented style conventions?
  • Do any prop types have missing descriptions in the Props API tables in the documentation site (check deploy preview)?
  • Were your changes tested using all available themes (see theme switcher in the header of the deploy preview, under the "Settings" icon)?
  • Were your changes tested in the example app?
  • Is there adequate test coverage for your changes?
  • Consider whether this change needs to reviewed/QA'ed for accessibility (a11y). If so, please request an a11y review for the PR in the #wg-paragon Open edX Slack channel.

Post-merge Checklist

  • Verify your changes were released to NPM at the expected version.
  • If you'd like, share your contribution in #show-and-tell.
  • 🎉 🙌 Celebrate! Thanks for your contribution.

Copy link

netlify bot commented Dec 12, 2024

Deploy Preview for paragon-openedx-v23 ready!

Name Link
🔨 Latest commit 36f2f59
🔍 Latest deploy log https://app.netlify.com/sites/paragon-openedx-v23/deploys/675b3b612d592d0007d7d553
😎 Deploy Preview https://deploy-preview-3360--paragon-openedx-v23.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Dec 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.87%. Comparing base (a633633) to head (36f2f59).
Report is 3 commits behind head on release-23.x.

Additional details and impacted files
@@              Coverage Diff              @@
##           release-23.x    #3360   +/-   ##
=============================================
  Coverage         93.87%   93.87%           
=============================================
  Files               232      232           
  Lines              3937     3937           
  Branches            933      933           
=============================================
  Hits               3696     3696           
  Misses              237      237           
  Partials              4        4           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@brian-smith-tcril brian-smith-tcril merged commit 92c43c3 into openedx:release-23.x Dec 12, 2024
10 checks passed
@openedx-semantic-release-bot

🎉 This PR is included in version 23.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants