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

feat: New success message, and attempt to check if a PR has been actually enbaled #19

Merged
merged 2 commits into from
Mar 7, 2021

Conversation

alexwilson
Copy link
Owner

Why?

Towards #18, this is an attempt to log more of what goes on when an AutoMerge request is sent.

What?

Attempt to log the enabledAt & enabledBy fields, and when they remain empty after a synchronous mutation, throw an error.

I'm not happy with this approach - ideally we'd be checking the actual status of a response. Unfortunately as the mutation doesn't include a status field.

So instead we check the AutoMergeRequest field in the PullRequest, and attempt to check if it has both enabledAt & enabledBy properties - and that they're valid.

@alexwilson alexwilson added bug Something isn't working enhancement New feature or request help wanted Extra attention is needed labels Mar 7, 2021
core_1.debug(`Enabling auto-merge for pull-request #${pullRequest.number}`);
yield this.enableAutoMerge(pullRequestId, mergeMethod);
core_1.debug(`Successfully enabled auto-merge for pull-request #${pullRequest.number}`);
core_1.debug(`Enabling auto-merge for pull-request #${pullRequest.number}...`);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this file have been commited?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Yep, this is re-generated automatically on each push. Maybe a tad unintuitive... 😓

Copy link
Collaborator

@JakeChampion JakeChampion left a comment

Choose a reason for hiding this comment

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

👍

@alexwilson
Copy link
Owner Author

Thanks for taking a look @JakeChampion - I'll revert this if it causes any unexpected behaviour!

@alexwilson alexwilson merged commit 8380ad6 into main Mar 7, 2021
@alexwilson alexwilson deleted the additional-automerge-logging branch March 7, 2021 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants