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

Run sync when issue is labeled with Sync Backport Changelog #63793

Merged

Conversation

noisysocks
Copy link
Member

Stacked onto #63792.

This PR goes a bit further and updates the Sync Core Backport workflow to run when an issue is labeled with the 🤖 Sync Backport Changelog label.

You can see it working here:

https://github.com/noisysocks/gutenberg/actions/runs/10034996226/job/27730360753

@noisysocks noisysocks added [Type] Enhancement A suggestion for improvement. GitHub Actions Pull requests that update GitHub Actions code labels Jul 22, 2024
@noisysocks noisysocks requested a review from desrosj as a code owner July 22, 2024 05:12
@noisysocks noisysocks self-assigned this Jul 22, 2024
Base automatically changed from fix/sync-backport-changelog-action to trunk July 22, 2024 05:18
Copy link
Member

@kevin940726 kevin940726 left a comment

Choose a reason for hiding this comment

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

LGTM 🚢

Copy link

github-actions bot commented Jul 22, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: noisysocks <[email protected]>
Co-authored-by: kevin940726 <[email protected]>
Co-authored-by: ellatrix <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@noisysocks noisysocks enabled auto-merge (squash) July 22, 2024 06:40
@noisysocks noisysocks disabled auto-merge July 22, 2024 06:40
@noisysocks
Copy link
Member Author

Thanks Kai! I'll merge tomorrow morning then create a new sync issue for 6.7 and we'll see if it works.

@@ -18,7 +27,13 @@ jobs:
run: |
Copy link
Member

Choose a reason for hiding this comment

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

We can skip checking out the repo to check for changes if it's triggered by the label

Copy link
Member Author

Choose a reason for hiding this comment

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

We have to check out the repo because of the awk in the script below. We can skip the git diff though. I've done that.

@noisysocks
Copy link
Member Author

noisysocks commented Jul 23, 2024

I've updated the script to skip the git diff when possible and I've gone back to using env.changes as it turns out this bug was just to do with a typo. See #63792 (comment).

Tested everything in my Gutenberg fork.

Here's merging a PR that has no changes in backport-changelog:

https://github.com/noisysocks/gutenberg/actions/runs/10050944095/job/27779706306

Here's merging a PR that has changes in backport-changelog:

https://github.com/noisysocks/gutenberg/actions/runs/10050926085/job/27779663400

Here's adding the label to an issue:

https://github.com/noisysocks/gutenberg/actions/runs/10050917093/job/27779640416

@noisysocks noisysocks enabled auto-merge (squash) July 23, 2024 01:20
@noisysocks noisysocks merged commit 15b48c6 into trunk Jul 23, 2024
60 checks passed
@noisysocks noisysocks deleted the update/run-sync-backport-changelog-job-when-issue-is-labeled branch July 23, 2024 01:55
@github-actions github-actions bot added this to the Gutenberg 18.9 milestone Jul 23, 2024
@noisysocks
Copy link
Member Author

Yay it works #63827

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GitHub Actions Pull requests that update GitHub Actions code [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants