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

Adding checkboxes and updating codeowners #156

Closed

Conversation

wavingtowaves
Copy link
Collaborator

@wavingtowaves wavingtowaves commented May 22, 2024

👋🏻 I'm opening up this PR, so that we can work on changes to an action file and the codeowners file described in #155

🔎 The details

The action file

  • Made a minor change to the name of the action
  • Made it so that the action runs on a push to a branch rather than on PR open/reopen/sync.
    • I'm wondering if this will be too noisy, or if this is what we want, that anytime someone pushes a change to the English version all the other branches get that update
    • We would need to confirm that this works on the very first push to a branch.
  • I did some reorganizing of the main step in the action and renamed NEW_BRANCH to TRANSLATION_BRANCH
  • Added code to get a specific PR number for a specific translation branch and is then used to update the description of the PR
  • Then we just filter to any new commits on the English branch and add those as markdown formatted checkboxes.
  • I tried to add myself as reviewer for any Spanish language PRs/commits here, so we can double check if this works.
  • Ultimately, the contents of checkboxes is a string that is added and/or updated in the PR description.

Here's a summary of the

Codeowners file

For CODEOWNERS I added myself as a language-specific reviewer for Spanish files. As I've currently modified the action, we specify who gets notified within the action. If we go that route, the action would need to be updated. But we could also think about how to make it more modular and rely on the codeowners files.

How do we test these changes?

@ntluong95 how have you been testing these changes? I usually end up having to merge changes and test them myself, but I'm not sure if you have a more efficient system that doesn't require merging changes into main and then testing. Let me know what you think about this, or any other suggested changes of course!

I'm sure we'll have to keep iterating on all this, so looking forward to the collaboration.

Copy link

netlify bot commented May 22, 2024

Deploy Preview for epirhandbook ready!

Name Link
🔨 Latest commit 176b12a
🔍 Latest deploy log https://app.netlify.com/sites/epirhandbook/deploys/666deb56b3782300083880c5
😎 Deploy Preview https://deploy-preview-156--epirhandbook.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

netlify bot commented May 22, 2024

Deploy Preview for euphonious-melomakarona-1c9abb ready!

Name Link
🔨 Latest commit 176b12a
🔍 Latest deploy log https://app.netlify.com/sites/euphonious-melomakarona-1c9abb/deploys/666deb569970cc0008134463
😎 Deploy Preview https://deploy-preview-156--euphonious-melomakarona-1c9abb.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

netlify bot commented May 22, 2024

Deploy Preview for erh-quarto ready!

Name Link
🔨 Latest commit 176b12a
🔍 Latest deploy log https://app.netlify.com/sites/erh-quarto/deploys/666deb56b55ed7000846fcf2
😎 Deploy Preview https://deploy-preview-156--erh-quarto.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.

@wavingtowaves wavingtowaves requested a review from ntluong95 June 14, 2024 16:14
@wavingtowaves wavingtowaves self-assigned this Jun 14, 2024
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Get the PR number for the translation branch
PR_NUMBER=$(gh pr list --base main --json number --jq ".[] | select(.headRefName == \"$TRANSLATION_BRANCH\") | .number")
Copy link
Member

Choose a reason for hiding this comment

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

It seems you have removed the command to automate the creation of PRs for each language branch, but you run the command to get the PR_NUMBER for the translation branch. As a result, I think I got an error here @robcrystalornelas @nsbatra
GA error
PR error

Copy link
Member

Choose a reason for hiding this comment

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

Also @robcrystalornelas, I dont have much experience on how to setup a testing system, but what I usually do is to create a separate en branch, implement changes to trigger the Action. I made some modifications in my test repo then this Action work, but the checkbox for the commit doesn't render well. Also if more commits are pushed into en branch, the PR from language versions couldn't update
image

@wavingtowaves
Copy link
Collaborator Author

@ntluong95 I'm closing out this PR since I think you've already incorporated these changes on the main branch. But correct me if I'm wrong here.

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.

2 participants