-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (41 loc) · 1.69 KB
/
Copy pathadd-project.yml
File metadata and controls
49 lines (41 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Add a project
on:
issue_comment:
types: [created, edited]
jobs:
add-project:
if: ${{ !github.event.issue.pull_request && contains(github.event.issue.labels.*.name, 'add-project') && startsWith(github.event.comment.body, '/draft-pr') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version: "3.11"
cache: pip
cache-dependency-path: justfile
- uses: extractions/setup-just@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: just bootstrap
- run: just add-project ${{ github.event.issue.number }}
env:
# For GitHub CLI
GH_TOKEN: ${{ github.token }}
- name: Create pull request
uses: peter-evans/create-pull-request@v8
with:
branch: |
create-pull-request/patch-for-issue-${{ github.event.issue.number }}
commit-message: |
[projects] ${{ github.event.issue.title }}
Resolves #${{ github.event.issue.number }}
title: "[projects] ${{ github.event.issue.title }}"
body: |
## What kind of change does this PR introduce?
- [x] Add a project
## Description
Resolves #${{ github.event.issue.number }}
## Final check
- [ ] I have read the [CONTRIBUTING](https://github.com/best-of-lists/best-of/blob/main/CONTRIBUTING.md) guidelines.
- [x] I have not modified the `README.md` file. Projects are only supposed to be added or updated within the `projects.yaml` file since the `README.md` file is automatically generated.
draft: always-true