Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto labels and draft #7321

Merged
merged 31 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
2c3faf0
test auto labeler
0xRobin Dec 12, 2024
d9bfed7
fix
0xRobin Dec 12, 2024
3623280
permissions
0xRobin Dec 12, 2024
9870338
only do labels
0xRobin Dec 12, 2024
9ac1df9
try gh cli
0xRobin Dec 12, 2024
f8c5e0a
try this
0xRobin Dec 12, 2024
d7bd624
try this for labels
0xRobin Dec 12, 2024
7bb3165
check repo
0xRobin Dec 12, 2024
84f6286
check auth status
0xRobin Dec 12, 2024
13dbbe2
set permissions at job level
0xRobin Dec 12, 2024
b828a6d
syntax
0xRobin Dec 12, 2024
8ffbe40
simplify permissions
0xRobin Dec 12, 2024
bde232a
test auto project labels
0xRobin Dec 12, 2024
1a1c6cf
make change in hourly
0xRobin Dec 12, 2024
c1a10cb
undo change in hourly
0xRobin Dec 12, 2024
6643339
make change in solana
0xRobin Dec 12, 2024
b1489c7
also set as draft/ready when labels are set
0xRobin Dec 12, 2024
8ebc47d
Revert "make change in solana"
0xRobin Dec 12, 2024
4734d54
ok this doesn't work, lets try this action
0xRobin Dec 12, 2024
916885a
try gh cli
0xRobin Dec 12, 2024
4226529
try this with gh api
0xRobin Dec 12, 2024
0b32642
try this
0xRobin Dec 12, 2024
792f97b
try this ID??
0xRobin Dec 12, 2024
65a95ec
enable content permissions
0xRobin Dec 12, 2024
9ad8a05
try gh CLI
0xRobin Dec 12, 2024
60d1296
syntax
0xRobin Dec 12, 2024
ba2ee3d
final setup?
0xRobin Dec 12, 2024
99f113f
add readme changes to each subproject to check labels
0xRobin Dec 12, 2024
55212f3
add simple tokens readme
0xRobin Dec 12, 2024
74115a3
Merge branch 'main' into auto-labels-and-draft
jeff-dude Dec 13, 2024
90ab18b
Merge branch 'main' into auto-labels-and-draft
0xRobin Dec 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
"dbt: daily":
- changed-files:
- any-glob-to-any-file: 'dbt_subprojects/daily_spellbook/**'

"dbt: dex":
- changed-files:
- any-glob-to-any-file: 'dbt_subprojects/dex/**'

"dbt: hourly":
- changed-files:
- any-glob-to-any-file: 'dbt_subprojects/hourly_spellbook/**'

"dbt: nft":
- changed-files:
- any-glob-to-any-file: 'dbt_subprojects/nft/**'

"dbt: solana":
- changed-files:
- any-glob-to-any-file: 'dbt_subprojects/solana/**'

"dbt: tokens":
- changed-files:
- any-glob-to-any-file: 'dbt_subprojects/tokens/**'
46 changes: 46 additions & 0 deletions .github/workflows/pr_automation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: PR automation

on:
pull_request:
types:
- opened
- ready_for_review
- converted_to_draft
- synchronize
- labeled

permissions:
pull-requests: write
contents: write

jobs:
pr-automation:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.number }}
steps:
- name: Mark new PR as Draft
if: (github.event.action == 'opened' && github.event.pull_request.draft == false)
run: gh pr ready "$NUMBER" --undo

- name: Set labels on Open
if: github.event.action == 'opened'
run: gh pr edit "$NUMBER" --add-label "WIP"

- name: Set labels on Draft
if: github.event.action == 'converted_to_draft'
run: gh pr edit "$NUMBER" --add-label "WIP" --remove-label "ready-for-review"

- name: Set labels on ready-for-review
if: github.event.action == 'ready_for_review'
run: gh pr edit "$NUMBER" --add-label "ready-for-review" --remove-label "WIP"

- name: Add subproject labels
if: contains('synchronize,opened,reopened', github.event.action)
uses: actions/labeler@v5
with:
sync-labels: true


1 change: 1 addition & 0 deletions dbt_subprojects/dex/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## DEX subproject


This is a DBT subproject for the main lineages of the DEX sector. Included in this subproject, but not limited to over time:
- `dex.trades`
- `dex_aggreagtor.trades`
Expand Down
2 changes: 1 addition & 1 deletion dbt_subprojects/hourly_spellbook/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## Hourly Spellbook

This is a DBT sub project for the all hourly models in spellbook
This is a DBT sub project for the all hourly models in spellbook.
2 changes: 1 addition & 1 deletion dbt_subprojects/nft/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## Daily Spellbook

This is a DBT sub project for the all the NFT related models in spellbook.
This is a DBT sub project for the all the NFT related models in spellbook
2 changes: 1 addition & 1 deletion dbt_subprojects/solana/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## Solana subproject

This is a DBT subproject for the main lineages of Solana data.
This is a DBT subproject for the main lineages of Solana data
3 changes: 3 additions & 0 deletions dbt_subprojects/tokens/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Tokens subproject

This is a DBT subproject for the main lineages of tokens data
Loading