-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #121 from LizardByte/nightly
v0.1.2
- Loading branch information
Showing
17 changed files
with
474 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
[flake8] | ||
filename = | ||
*.py | ||
*.py, | ||
*.pys | ||
max-line-length = 120 | ||
extend-exclude = | ||
venv/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,8 @@ | |
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in | ||
# the above-mentioned repo. | ||
|
||
# This workflow will, first, automatically approve PRs created by @LizardByte-bot. Then it will automerge relevant PRs. | ||
|
||
name: Automerge PR | ||
|
||
on: | ||
|
@@ -11,15 +13,20 @@ on: | |
- opened | ||
- synchronize | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
autoapprove: | ||
if: > | ||
if: >- | ||
contains(fromJson('["LizardByte-bot"]'), github.event.pull_request.user.login) && | ||
contains(fromJson('["LizardByte-bot"]'), github.actor) | ||
contains(fromJson('["LizardByte-bot"]'), github.actor) && | ||
startsWith(github.repository, 'LizardByte/') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Autoapproving | ||
uses: hmarr/auto-approve-action@v2 | ||
uses: hmarr/auto-approve-action@v3 | ||
with: | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
|
@@ -36,20 +43,18 @@ jobs: | |
}) | ||
automerge: | ||
if: startsWith(github.repository, 'LizardByte/') | ||
needs: [autoapprove] | ||
runs-on: ubuntu-latest | ||
concurrency: | ||
group: automerge-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
steps: | ||
- name: Automerging | ||
uses: pascalgn/[email protected].3 | ||
uses: pascalgn/[email protected].5 | ||
env: | ||
BASE_BRANCHES: nightly | ||
GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }} | ||
GITHUB_LOGIN: ${{ secrets.GH_BOT_NAME }} | ||
MERGE_LABELS: "" | ||
MERGE_LABELS: "!dependencies" | ||
MERGE_METHOD: "squash" | ||
MERGE_COMMIT_MESSAGE: "{pullRequest.title} (#{pullRequest.number})" | ||
MERGE_DELETE_BRANCH: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- | ||
# This action is centrally managed in https://github.com/<organization>/.github/ | ||
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in | ||
# the above-mentioned repo. | ||
|
||
# Label PRs with `autoupdate` if various conditions are met, otherwise, remove the label. | ||
|
||
name: Label PR autoupdate | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- edited | ||
- opened | ||
- reopened | ||
- synchronize | ||
|
||
jobs: | ||
label_pr: | ||
if: >- | ||
startsWith(github.repository, 'LizardByte/') && | ||
contains(github.event.pull_request.body, fromJSON('"] I want maintainers to keep my branch updated"')) | ||
runs-on: ubuntu-latest | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
steps: | ||
- name: Check if member | ||
id: org_member | ||
run: | | ||
status="true" | ||
gh api \ | ||
-H "Accept: application/vnd.github+json" \ | ||
/orgs/${{ github.repository_owner }}/members/${{ github.actor }} || status="false" | ||
echo "result=${status}" >> $GITHUB_OUTPUT | ||
- name: Label autoupdate | ||
if: >- | ||
steps.org_member.outputs.result == 'true' && | ||
contains(github.event.pull_request.labels.*.name, 'autoupdate') == false && | ||
contains(github.event.pull_request.body, | ||
fromJSON('"\n- [x] I want maintainers to keep my branch updated"')) == true | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ secrets.GH_BOT_TOKEN }} | ||
script: | | ||
github.rest.issues.addLabels({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
labels: ['autoupdate'] | ||
}) | ||
- name: Unlabel autoupdate | ||
if: >- | ||
contains(github.event.pull_request.labels.*.name, 'autoupdate') && | ||
( | ||
(github.event.action == 'synchronize' && steps.org_member.outputs.result == 'false') || | ||
(contains(github.event.pull_request.body, | ||
fromJSON('"\n- [x] I want maintainers to keep my branch updated"')) == false | ||
) | ||
) | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ secrets.GH_BOT_TOKEN }} | ||
script: | | ||
github.rest.issues.removeLabel({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
name: ['autoupdate'] | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,11 +3,13 @@ | |
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in | ||
# the above-mentioned repo. | ||
|
||
# This workflow is designed to work with: | ||
# - automerge workflows | ||
# This workflow is designed to work with the following workflows: | ||
# - automerge | ||
# - autoupdate-labeler | ||
|
||
# It uses GitHub Action that auto-updates pull requests branches, when changes are pushed to their destination branch. | ||
# It uses an action that auto-updates pull requests branches, when changes are pushed to their destination branch. | ||
# Auto-updating to the latest destination branch works only in the context of upstream repo and not forks. | ||
# Dependabot PRs are updated by an action that comments `@depdenabot rebase` on dependabot PRs. (disabled) | ||
|
||
name: autoupdate | ||
|
||
|
@@ -17,16 +19,33 @@ on: | |
- 'nightly' | ||
|
||
jobs: | ||
autoupdate-for-bot: | ||
autoupdate: | ||
name: Autoupdate autoapproved PR created in the upstream | ||
if: startsWith(github.repository, 'LizardByte/') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Update | ||
uses: docker://chinthakagodawita/autoupdate-action:v1 | ||
env: | ||
EXCLUDED_LABELS: "central_dependency,dependencies" | ||
GITHUB_TOKEN: '${{ secrets.GH_BOT_TOKEN }}' | ||
PR_FILTER: "labelled" | ||
PR_LABELS: "autoupdate" | ||
PR_READY_STATE: "ready_for_review" | ||
MERGE_CONFLICT_ACTION: "ignore" | ||
PR_READY_STATE: "all" | ||
MERGE_CONFLICT_ACTION: "fail" | ||
|
||
# Disabled due to: | ||
# - no major version tag, resulting in constant nagging to update this action | ||
# - additionally, the code is sketchy, 16k+ lines of code? | ||
# https://github.com/bbeesley/gha-auto-dependabot-rebase/blob/main/dist/main.cjs | ||
# | ||
# dependabot-rebase: | ||
# name: Dependabot Rebase | ||
# if: >- | ||
# startsWith(github.repository, 'LizardByte/') | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: rebase | ||
# uses: "bbeesley/[email protected]" | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }} |
Oops, something went wrong.