Skip to content

Commit 3b53c01

Browse files
Jamie Tannajamietanna
authored andcommitted
build(labels): add autolabeller for "no main branch please"
This follows setup from Renovate, as a project with a good setup we can follow. We'll add this for Issues, Discussions and PRs for now, even though this only directly applies to PRs.
1 parent cc97261 commit 3b53c01

2 files changed

Lines changed: 34 additions & 0 deletions

File tree

.github/label-actions.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
'auto:no-head-branch':
2+
comment: >
3+
Thanks for the contribution!
4+
5+
It looks like this PR was raised from the `main` branch.
6+
7+
As per [our contributing guidelines](https://github.com/oapi-codegen/oapi-codegen/blob/main/CONTRIBUTING.md#before-you-raise-a-pr), this can make it difficult for us to push changes to your fork - for instance to directly push a change to address a comment that we would raise, or to finalise changes before merge.
8+
9+
Please re-raise the PR from a branch on your repository that isn't `main` / any protected branches.
10+
11+
Thank you in advance 🙇🏼
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: 'Label Actions'
2+
3+
on:
4+
issues:
5+
types: [labeled]
6+
discussion:
7+
types: [labeled]
8+
pull_request_target:
9+
types: [labeled]
10+
11+
permissions:
12+
contents: read
13+
issues: write
14+
discussions: write
15+
pull-requests: write
16+
17+
jobs:
18+
reaction:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: dessant/label-actions@102faf474a544be75fbaf4df54e73d3c515a0e65 # v4.0.1
22+
with:
23+
github-token: ${{ github.token }}

0 commit comments

Comments
 (0)