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(draft-pr): add new option to not process PRs which are in draft #539

Merged
merged 4 commits into from
Sep 20, 2021

Conversation

C0ZEN
Copy link
Contributor

@C0ZEN C0ZEN commented Jul 31, 2021

Changes

  • Add new option "exempt-draft-pr" to not process a PR which is in draft

Context

Closes #36 (even if already closed).
See #36 (comment).

@C0ZEN C0ZEN marked this pull request as ready for review July 31, 2021 12:45
@C0ZEN C0ZEN requested a review from a team as a code owner July 31, 2021 12:45
@derek-bisson-ukg
Copy link

very much looking forward to this!

@C0ZEN
Copy link
Contributor Author

C0ZEN commented Sep 8, 2021

up

@github-actions github-actions bot removed the Stale label Sep 9, 2021
Copy link
Collaborator

@luketomlinson luketomlinson left a comment

Choose a reason for hiding this comment

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

💥 I like it @C0ZEN. Left one minor comment. There's some merge conflicts too.

// Delete the branch on closed pull request
private async _deleteBranch(issue: Issue): Promise<void> {
const issueLogger: IssueLogger = new IssueLogger(issue);

issueLogger.info(`Delete branch from closed $$type - ${issue.title}`);

const pullRequest = await this._getPullRequest(issue);
const pullRequest: IPullRequest | undefined | void =
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think you have to specify the type here. Could just do const pullRequest = await this._getPullRequest(issue)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

FYI: I do this on purpose because I prefer explicit types; easier to review and code IMO

@C0ZEN
Copy link
Contributor Author

C0ZEN commented Sep 19, 2021

Ready

@luketomlinson luketomlinson merged commit 9912fa7 into actions:main Sep 20, 2021
@nantiferov
Copy link

nantiferov commented Sep 20, 2021

@C0ZEN thank you!

@luketomlinson main branch hasn't tagged yet with new release, latest is v4.0.0 from July https://github.com/actions/stale/releases/tag/v4.0.0
Do you plan to update it? I would like to test this feature, but I think it's not really safe to use @main in GitHub Action.

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.

Option to ignore draft PRs
4 participants