From 96b20ba7e1dd485cfe9c0e54f0b10ebdd41d9046 Mon Sep 17 00:00:00 2001 From: phillip-stephens Date: Tue, 11 Jun 2024 17:56:36 +0900 Subject: [PATCH] try using Pull app --- .github/pull.yml | 9 +++++ .github/workflows/upstream-tag-check.yml | 46 ------------------------ 2 files changed, 9 insertions(+), 46 deletions(-) create mode 100644 .github/pull.yml delete mode 100644 .github/workflows/upstream-tag-check.yml diff --git a/.github/pull.yml b/.github/pull.yml new file mode 100644 index 0000000000..ffdb37084d --- /dev/null +++ b/.github/pull.yml @@ -0,0 +1,9 @@ +# Config for https://github.com/wei/pull Pull app +version: "1" +rules: # Array of rules + - base: master # Required. Target branch + upstream: miekg/dns:master # Required. Must be in the same fork network. + mergeMethod: none # Optional, one of [none, merge, squash, rebase, hardreset], Default: none. + mergeUnstable: false # Optional, merge pull request even when the mergeable_state is not clean. Default: false +label: ":arrow_heading_down: pull" # Optional +conflictLabel: "merge-conflict" # Optional, on merge conflict assign a custom label, Default: merge-conflict \ No newline at end of file diff --git a/.github/workflows/upstream-tag-check.yml b/.github/workflows/upstream-tag-check.yml deleted file mode 100644 index 47b3570307..0000000000 --- a/.github/workflows/upstream-tag-check.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Sync miekg/dns with zmap/dns - -on: - # Only for testing - pull_request: -# branches: [github-action-when-upstream-tagged] - schedule: - - cron: '0 0 * * *' # This will run the action daily - workflow_dispatch: # Allows manual trigger - - -jobs: - sync-fork: - runs-on: ubuntu-latest - steps: - - name: Check out code - uses: actions/checkout@v2 - - - name: Set up Git user name and email - run: | - git config --global user.name 'GitHub Actions' - git config --global user.email 'actions@github.com' - - - name: Fetch upstream changes - run: | - git remote add upstream https://github.com/miekg/dns.git - git fetch upstream - - - name: Check for changes - id: check-changes - run: | - if [ $(git rev-list --count HEAD..upstream/master) -gt 0 ]; then - echo "::set-output name=changes::true" - else - echo "::set-output name=changes::false" - fi - - - name: Create pull request - if: steps.check-changes.outputs.changes == 'true' - run: | - git checkout -b sync-$(date +'%Y-%m-%d') - git merge upstream/master --no-edit - git push origin sync-$(date +'%Y-%m-%d') - gh pr create --title "Sync with upstream" --body "Automated PR to sync with upstream." --base master --head sync-$(date +'%Y-%m-%d\nDon't forget to tag the new version so it is picked up by users') - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file