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

Fix broken merge-schedule gh action #3346

Merged
merged 1 commit into from
Mar 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/merge-schedule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ jobs:
merge_schedule:
runs-on: ubuntu-latest
if:
${{ github.event.pull_request.head.repo.full_name == github.repository }}
${{ github.event_name == 'schedule' ||
Copy link
Contributor Author

@julieg18 julieg18 Mar 9, 2022

Choose a reason for hiding this comment

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

Figured out why #3282 wasn't merging! This action runs on pull_request (for finding prs that need to be merged) and on schedule (for actually merging the prs). This if statement was stopping the action from running on schedule. Hopefully, this update, which checks for event_name, should fix the action.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to have if statement at all 🤔 ? If I understand correctly, it is mentioned that pull requests from forks are ignored and I believe the pull request is generated when we have /schedule date so the event name would be schedule itself.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we need to have if statement at all 🤔 ?

Yes! The action still runs on forks and fails on them. See #3215 convo. So we put down the if statement (#3267) so that this action will get skipped on forks.

github.event.pull_request.head.repo.full_name == github.repository }}
steps:
- uses: gr2m/merge-schedule-action@v1
with:
Expand Down