Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

feat: additional pr compliance checks #1178

Merged
merged 4 commits into from
Oct 8, 2021

Conversation

mtfoley
Copy link
Contributor

@mtfoley mtfoley commented Oct 2, 2021

What type of PR is this? (check all applicable)

  • ♻️ Refactor
  • ✨ Feature
  • 🐛 Bug Fix
  • 👷 Optimization
  • 📝 Documentation Update
  • 🔖 Release
  • 🚩 Other

Description

I've been working on an action lately that we might be able to implement here in early October.
Among other checks, this looks for PRs not being linked to an issue, not being from the right branch, having incorrect title, and/or modifying key files.
https://github.com/mtfoley/pr-compliance-action

I don't know the right way though to have this interact with the "welcome action". The semantic release action fails a check, but it's only looking at the issue. This new one will close the PR on a missing issue reference or having the wrong head branch, and that could be kind of a mixed signal with the welcome for first time contributors.

Related Tickets & Documents

This PR closes #745.

Mobile & Desktop Screenshots/Recordings

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help

Added to documentation?

  • 📜 readme
  • 📜 contributing.md
  • 📓 docs
  • 📕 storybook
  • 🙅 no documentation needed

[optional] Are there any post-deployment tasks we need to perform?

psssh probably

[optional] What gif best describes this PR or how it makes you feel?

denied

@@ -15,6 +16,16 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

compliance-checks:
Copy link
Contributor

Choose a reason for hiding this comment

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

would replace this with semantics or just prefix it with pr/pull request

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed wording. would we still want the semantics action?

@0-vortex
Copy link
Contributor

0-vortex commented Oct 2, 2021

closing the pull request is an anti-pattern with the squash feature as it doesn't really affect the main branch history or parallel pull requests, any way to disable/switch that to a comment?

@mtfoley
Copy link
Contributor Author

mtfoley commented Oct 2, 2021

Thought I overheard bdougie say the auto close was desired behavior. We can set these inputs:

body-auto-close: false
body-comment: "our message"
protected-branch-auto-close: false
protected-branch-comment: "our other message"

I did manage to get the README updated for inputs and such, and I updated the regex for the other verbs like fix and close.

https://github.com/mtfoley/pr-compliance-action

@0-vortex
Copy link
Contributor

0-vortex commented Oct 3, 2021

Thought I overheard bdougie say the auto close was desired behavior. We can set these inputs:

body-auto-close: false body-comment: "our message" protected-branch-auto-close: false protected-branch-comment: "our other message"

I did manage to get the README updated for inputs and such, and I updated the regex for the other verbs like fix and close.

https://github.com/mtfoley/pr-compliance-action

Awesome, it has my vote!

Copy link
Member

@bdougie bdougie left a comment

Choose a reason for hiding this comment

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

LGTM

@bdougie bdougie merged commit c8a2a39 into open-sauced:main Oct 8, 2021
github-actions bot pushed a commit that referenced this pull request Oct 8, 2021
## [0.32.0](v0.31.0...v0.32.0) (2021-10-08)

### Features

* additional pr compliance checks ([#1178](#1178)) ([c8a2a39](c8a2a39))
@github-actions
Copy link
Contributor

github-actions bot commented Oct 8, 2021

🎉 This PR is included in version 0.32.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@mtfoley mtfoley deleted the 745-pr-compliance-action branch October 11, 2021 18:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Create action to comment on PR's that have no linked issues.
3 participants