Skip to content

Commit

Permalink
feature/boilerplate updates and fixes (#8)
Browse files Browse the repository at this point in the history
# Added

- add review assignment to mex-template itself

# Changes

- improve prompt for project name

# Fixed

- fix finding of rejected cruft files
- fix dependabot pr review assignment

---------

Signed-off-by: Nicolas Drebenstedt <[email protected]>
  • Loading branch information
cutoffthetop authored Mar 12, 2024
1 parent cb3e3d3 commit 5007775
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 9 deletions.
2 changes: 0 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ updates:
- package-ecosystem: "github-actions"
allow:
- dependency-type: "all"
assignees:
- ${{secrets.MEX_BOT_USER}}
directory: "/"
labels:
- "dependabot"
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/reviewing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Reviewing

on:
pull_request:
types:
- opened
- reopened

jobs:
assignee:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Add assignee
env:
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
run: |
user_name="${{ github.event.pull_request.user.login }}"
user_type=$(gh api "users/${user_name}" --jq ".type")
echo $user_name is a $user_type
if [[ "$user_type" != "User" ]]; then
user_name="${{ vars.MEX_BOT_USER }}"
echo using $user_name instead
fi
if [[ -z "${{ github.event.pull_request.assignee.login }}" ]]; then
gh pr edit ${{ github.event.pull_request.html_url }} --add-assignee "${user_name}"
fi
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- add review assignment to mex-template itself

### Changes

- improve prompt for project name

### Deprecated

### Removed

### Fixed

- fix finding of rejected cruft files
- fix dependabot pr review assignment

### Security

Expand Down
2 changes: 1 addition & 1 deletion cookiecutter.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"project_name": "project",
"project_name": "Choose a project name. Should be a single word. Must be written in snake_case.",
"short_summary": "Write a short tagline for your project.",
"long_summary": "Explain your project in a bit more detail, 50-100 words would be ideal. Line-breaks are not needed as the text will be auto-wrapped."
}
4 changes: 0 additions & 4 deletions mex-{{ cookiecutter.project_name }}/.github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ updates:
- package-ecosystem: "github-actions"
allow:
- dependency-type: "all"
assignees:
{% raw %}- ${{secrets.MEX_BOT_USER}}{% endraw %}
directory: "/"
labels:
- "dependabot"
Expand All @@ -14,8 +12,6 @@ updates:
- package-ecosystem: "pip"
allow:
- dependency-type: "all"
assignees:
{% raw %}- ${{secrets.MEX_BOT_USER}}{% endraw %}
directory: "/"
labels:
- "dependabot"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- name: Add assignee
env:
{% raw %}GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}{% endraw %}
{% raw %}GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}{% endraw %}
run: |
{% raw -%}
user_name="${{ github.event.pull_request.user.login }}"
Expand Down
2 changes: 1 addition & 1 deletion mex-{{ cookiecutter.project_name }}/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cruft==2.15.0
poetry==1.8.2
pre-commit==3.6.2
wheel==0.42.0
wheel==0.43.0

0 comments on commit 5007775

Please sign in to comment.