diff --git a/.github/workflows/cherry-picker-on-close.yml b/.github/workflows/cherry-picker-on-close.yml new file mode 100644 index 00000000000000..1442078176c8ee --- /dev/null +++ b/.github/workflows/cherry-picker-on-close.yml @@ -0,0 +1,29 @@ +name: cherry-picker-on-close + +on: + pull_request: + # branches: [master] + types: [closed] + # push: + # branches: [ release_test, 'iancha_test[0-9]' ] + +env: + GH_TOKEN: ${{ secrets.CLASSIC_TOKEN_IAN }} + +jobs: + cherry-picker-on-close: + # if: github.event.pusher.name == 'iancha1992' + # if: github.event.pull_request.merged == true + runs-on: ubuntu-latest + steps: + # - name: Harden Runner + # uses: step-security/harden-runner@6b3083af2869dc3314a0257a42f4af696cc79ba3 # v2.3.1 + # with: + # egress-policy: audit + - name: Logging github event + run: echo '${{ toJSON(github.event) }}' | jq + - name: Run cherrypicker on close + uses: iancha1992/continuous-integration/actions/cherry-picker@feature-cherrypick + with: + triggered-on: closed + pr-number: ${{ github.event.number }} diff --git a/.github/workflows/cherry-picker-on-comment.yml b/.github/workflows/cherry-picker-on-comment.yml new file mode 100644 index 00000000000000..c27eb60e7ec3eb --- /dev/null +++ b/.github/workflows/cherry-picker-on-comment.yml @@ -0,0 +1,60 @@ +name: cherry-picker-on-comment + +on: + issues: + types: [milestoned] + # issue_comment: + # types: [created] + +env: + GH_TOKEN: ${{ secrets.CLASSIC_TOKEN_IAN }} + +jobs: + cherry-picker-on-comment: + if: startsWith(github.event.issue.body, 'Forked from') && (github.event.issue.user.login == 'iancha1992') + runs-on: ubuntu-latest + steps: + - name: Harden Runner + uses: step-security/harden-runner@6b3083af2869dc3314a0257a42f4af696cc79ba3 # v2.3.1 + with: + egress-policy: audit + - name: Logging github event + run: echo '${{ toJSON(github.event) }}' | jq + - name: Run cherrypicker on comment + uses: iancha1992/continuous-integration/actions/cherry-picker@feature-cherrypick + with: + triggered-on: commented + pr-number: ${{ github.event.issue.body }} + + # create-pr: + # permissions: + # # id-token: write + # # contents: write + # issues: write + # pull-requests: write + # runs-on: ubuntu-latest + # steps: + # - run: gh pr create --repo chaheein123/bazel --title cocacola --body hihi --head iancha1992:tomtesting --base fake-release-6.3.0 + # # - run: | + # # curl -L -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.CLASSIC_TOKEN_IAN }}" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/chaheein123/bazel/pulls -d '{"title":"Amazing new feature","body":"Please pull these awesome changes in!","head":"iancha1992:tomtesting","base":"fake-release-6.3.0"}' + # # - run: gh api --method POST -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" \ + # # /repos/OWNER/REPO/pulls \ + # # -f title='Amazing new feature' \ + # # -f body='Please pull these awesome changes in!' \ + # # -f head='octocat:new-feature' \ + # # -f base='master' + # env: + # # GITHUB_TOKEN: ${{ secrets.BAZEL_IO_TOKEN }} + # GITHUB_TOKEN: ${{ secrets.CLASSIC_TOKEN_IAN }} + + + + # - uses: actions/checkout@v3 + # - name: Create Pull Request + # uses: peter-evans/create-pull-request@v5 + # with: + # token: ${{ secret.BAZEL_IO_TOKEN }} + # push-to-fork: chaheein123/bazel + # base: + # title: ianchatesting + # body: hihi diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 2a6ab1c0048c94..60accf09d0b9d5 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -18,6 +18,8 @@ jobs: uses: step-security/harden-runner@6b3083af2869dc3314a0257a42f4af696cc79ba3 # v2.3.1 with: egress-policy: audit + - name: Logging github event + run: echo '${{ toJSON(github.event.pull_request.user.login) }}' | jq - uses: actions/labeler@ba790c862c380240c6d5e7427be5ace9a05c754b # v4.0.3 - if: ${{ github.event.pull_request.draft == false }} \ No newline at end of file + if: ${{ github.event.pull_request.draft == false && github.event.pull_request.user.login != 'iancha1992'}} diff --git a/.github/workflows/release-helper.yml b/.github/workflows/release-helper.yml index b4c94e981ee7df..226c4bb0715965 100644 --- a/.github/workflows/release-helper.yml +++ b/.github/workflows/release-helper.yml @@ -18,6 +18,6 @@ jobs: egress-policy: audit - name: Run helper - uses: bazelbuild/continuous-integration/actions/release-helper@70ab2cc80222b90afde06fa0b3b7c067239777b4 # master + uses: iancha1992/continuous-integration/actions/release-helper@release_test # master with: token: ${{ secrets.BAZEL_IO_TOKEN }} diff --git a/.github/workflows/test.txt b/.github/workflows/test.txt new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/README.md b/README.md index ee4c8b4eaa434f..4e14f85f1cb2c6 100644 --- a/README.md +++ b/README.md @@ -56,3 +56,4 @@ disclosure timeline. See [CONTRIBUTING.md](CONTRIBUTING.md) [![Build status](https://badge.buildkite.com/1fd282f8ad98c3fb10758a821e5313576356709dd7d11e9618.svg?status=master)](https://buildkite.com/bazel/bazel-bazel) +a