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

Make auto-pr robust to avoid timing issue or etc #1347

Merged
merged 1 commit into from
Dec 6, 2023

Conversation

komamitsu
Copy link
Contributor

@komamitsu komamitsu commented Dec 6, 2023

Description

We recently observed a few times that Auto-PR workflow wasn't triggered. I asked GitHub support and they recommended the following options:

  1. Use pull_request_target event instead of pull_request event

  2. Remove the current guard condition types: closed to mitigate the risk of failing to trigger the workflow

For 1, pull_request_target is more powerful. But it also introduces some security concerns. So, trying 2 would be reasonable.

Related issues and/or PRs

N/A

Changes made

This PR removes the guard condition types: closed to mitigate the risk of failing to invoke the workflow. It should be okay since the workflow also has if_merged: if: github.event.pull_request.merged == true condition.

Checklist

The following is a best-effort checklist. If any items in this checklist are not applicable to this PR or are dependent on other, unmerged PRs, please still mark the checkboxes after you have read and understood each item.

  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation to reflect the changes.
  • Any remaining open issues linked to this PR are documented and up-to-date (Jira, GitHub, etc.).
  • Tests (unit, integration, etc.) have been added for the changes.
  • My changes generate no new warnings.
  • Any dependent changes in other PRs have been merged and published.

Additional notes (optional)

N/A

Release notes

N/A

@komamitsu komamitsu added the github_actions Pull requests that update GitHub Actions code label Dec 6, 2023
@komamitsu komamitsu self-assigned this Dec 6, 2023
Copy link
Collaborator

@brfrn169 brfrn169 left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

Copy link
Contributor

@feeblefakie feeblefakie left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

@feeblefakie feeblefakie merged commit f2b34fe into master Dec 6, 2023
24 checks passed
@feeblefakie feeblefakie deleted the auto-pr-more-robust branch December 6, 2023 08:42
komamitsu added a commit that referenced this pull request Dec 7, 2023
@komamitsu
Copy link
Contributor Author

@feeblefakie We quickly reverted this PR as Auto-PR hasn't been triggered successfully since it was merged. I'll ask GitHub support about the issue.

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 improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants