Skip to content

add note about configuring PR branch deletion in repository setting - #19

Closed
joyeecheung wants to merge 2 commits into
nodejs:mainfrom
joyeecheung:delete-branch
Closed

add note about configuring PR branch deletion in repository setting#19
joyeecheung wants to merge 2 commits into
nodejs:mainfrom
joyeecheung:delete-branch

Conversation

@joyeecheung

Copy link
Copy Markdown
Member

No description provided.

@aduh95

aduh95 commented Dec 10, 2024

Copy link
Copy Markdown
Contributor

I feel quite strongly this is not the right approach, instead of more docs, let's have GitHub enforce it for us with https://github.com/nodejs/bluesky/settings/rules/2926087 and #16

@joyeecheung

Copy link
Copy Markdown
Member Author

Do you happen to know how to write a rule set that

  1. Disables direct commits to main from GitHub UI
  2. Still allows commits pushed/removed from main from the CLI?

@aduh95

aduh95 commented Dec 10, 2024

Copy link
Copy Markdown
Contributor

I think when we need to push to main, we can temporarily disable the rule. For the automation, we can have the bot on the exception list

@joyeecheung

joyeecheung commented Dec 10, 2024

Copy link
Copy Markdown
Member Author

Doesn't that setup still require more docs in this section, for someone setting up the automation for the first time? And instead of pointing people to this link and let the workflow prevents unreviewed actions, we point them to a different link to the rule set yet still allow the workflow to accept unreviewed actions?

@aduh95

aduh95 commented Dec 10, 2024

Copy link
Copy Markdown
Contributor

I think that's fine, it's much easier for someone writing an automation to be forced to read a doc, rather than relying on contributors to refrain from doing a very common thing (deleting the head branch once the PR has merged)

@joyeecheung

Copy link
Copy Markdown
Member Author

I think so far the incidents only happened when GitHub deleted the branch. Usually the action finishes in <30s which is not a lot of time to wait until you click another button to delete the branch.

@aduh95

aduh95 commented Dec 10, 2024

Copy link
Copy Markdown
Contributor

I've pushed another commit to #16 so the workflow doesn't use the deletable branch

@joyeecheung

Copy link
Copy Markdown
Member Author

From #23 it seems the forks need to disable it too, which is a bit too much. I think trying to put the limitation in the base repo would be the best approach, so closing.

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.

2 participants