diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-04-09 18:28:16 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-04-12 18:46:15 +0000 |
commit | fd2e737e0678ee7d8081baef05b305146a2c0034 (patch) | |
tree | ac3e9b27576a0382335532d126f9a66d486bc638 /nixpkgs/.github | |
parent | cc207d720b6aa836e256c1ee9842bc739e630a8a (diff) | |
parent | 9e377a6ce42dccd9b624ae4ce8f978dc892ba0e2 (diff) | |
download | nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.gz nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.bz2 nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.lz nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.xz nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.zst nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.zip |
Merge remote-tracking branch 'nixpkgs/nixos-unstable'
Diffstat (limited to 'nixpkgs/.github')
-rw-r--r-- | nixpkgs/.github/CODEOWNERS | 18 | ||||
-rw-r--r-- | nixpkgs/.github/labeler.yml | 147 | ||||
-rw-r--r-- | nixpkgs/.github/workflows/editorconfig.yml | 2 | ||||
-rw-r--r-- | nixpkgs/.github/workflows/labels.yml | 15 | ||||
-rw-r--r-- | nixpkgs/.github/workflows/manual-nixos.yml | 4 | ||||
-rw-r--r-- | nixpkgs/.github/workflows/manual-nixpkgs.yml | 4 | ||||
-rw-r--r-- | nixpkgs/.github/workflows/rebase-staging.yml | 60 | ||||
-rw-r--r-- | nixpkgs/.github/workflows/rebase.yml | 134 |
8 files changed, 310 insertions, 74 deletions
diff --git a/nixpkgs/.github/CODEOWNERS b/nixpkgs/.github/CODEOWNERS index 7d0681a720c5..b15d89219f43 100644 --- a/nixpkgs/.github/CODEOWNERS +++ b/nixpkgs/.github/CODEOWNERS @@ -79,11 +79,11 @@ /pkgs/development/tools/poetry2nix @adisbladis # Haskell -/pkgs/development/compilers/ghc @cdepillabout -/pkgs/development/haskell-modules @cdepillabout -/pkgs/development/haskell-modules/default.nix @cdepillabout -/pkgs/development/haskell-modules/generic-builder.nix @cdepillabout -/pkgs/development/haskell-modules/hoogle.nix @cdepillabout +/pkgs/development/compilers/ghc @cdepillabout @sternenseemann +/pkgs/development/haskell-modules @cdepillabout @sternenseemann +/pkgs/development/haskell-modules/default.nix @cdepillabout @sternenseemann +/pkgs/development/haskell-modules/generic-builder.nix @cdepillabout @sternenseemann +/pkgs/development/haskell-modules/hoogle.nix @cdepillabout @sternenseemann # Perl /pkgs/development/interpreters/perl @volth @stigtsp @@ -95,12 +95,12 @@ /pkgs/development/r-modules @peti # Ruby -/pkgs/development/interpreters/ruby @alyssais -/pkgs/development/ruby-modules @alyssais +/pkgs/development/interpreters/ruby @marsam +/pkgs/development/ruby-modules @marsam # Rust /pkgs/development/compilers/rust @Mic92 @LnL7 @zowoq -/pkgs/build-support/rust @andir @zowoq +/pkgs/build-support/rust @andir @danieldk @zowoq # Darwin-related /pkgs/stdenv/darwin @NixOS/darwin-maintainers @@ -139,7 +139,7 @@ /pkgs/development/libraries/qt-5 @ttuegel # PostgreSQL and related stuff -/pkgs/servers/sql/postgresql @thoughtpolice +/pkgs/servers/sql/postgresql @thoughtpolice @marsam /nixos/modules/services/databases/postgresql.xml @thoughtpolice /nixos/modules/services/databases/postgresql.nix @thoughtpolice /nixos/tests/postgresql.nix @thoughtpolice diff --git a/nixpkgs/.github/labeler.yml b/nixpkgs/.github/labeler.yml new file mode 100644 index 000000000000..77422234ab3d --- /dev/null +++ b/nixpkgs/.github/labeler.yml @@ -0,0 +1,147 @@ +"6.topic: agda": + - doc/languages-frameworks/agda.section.md + - nixos/tests/agda.nix + - pkgs/build-support/agda/**/* + - pkgs/development/libraries/agda/**/* + - pkgs/top-level/agda-packages.nix + +"6.topic: cinnamon": + - pkgs/desktops/cinnamon/**/* + +"6.topic: emacs": + - nixos/modules/services/editors/emacs.nix + - nixos/modules/services/editors/emacs.xml + - nixos/tests/emacs-daemon.nix + - pkgs/applications/editors/emacs-modes/**/* + - pkgs/applications/editors/emacs/**/* + - pkgs/build-support/emacs/**/* + - pkgs/top-level/emacs-packages.nix + +"6.topic: erlang": + - doc/languages-frameworks/beam.section.md + - pkgs/development/beam-modules/**/* + - pkgs/development/interpreters/elixir/**/* + - pkgs/development/interpreters/erlang/**/* + - pkgs/development/tools/build-managers/rebar/**/* + - pkgs/development/tools/build-managers/rebar3/**/* + - pkgs/development/tools/erlang/**/* + - pkgs/top-level/beam-packages.nix + +"6.topic: fetch": + - pkgs/build-support/fetch*/**/* + +"6.topic: GNOME": + - doc/languages-frameworks/gnome.section.md + - nixos/modules/services/desktops/gnome3/**/* + - nixos/modules/services/x11/desktop-managers/gnome3.nix + - nixos/tests/gnome3-xorg.nix + - nixos/tests/gnome3.nix + - pkgs/desktops/gnome-3/**/* + +"6.topic: golang": + - doc/languages-frameworks/go.section.md + - pkgs/development/compilers/go/**/* + - pkgs/development/go-modules/**/* + - pkgs/development/go-packages/**/* + +"6.topic: haskell": + - doc/languages-frameworks/haskell.section.md + - pkgs/development/compilers/ghc/**/* + - pkgs/development/haskell-modules/**/* + - pkgs/development/tools/haskell/**/* + - pkgs/top-level/haskell-packages.nix + +"6.topic: kernel": + - pkgs/build-support/kernel/**/* + - pkgs/os-specific/linux/kernel/**/* + +"6.topic: lua": + - pkgs/development/interpreters/lua-5/**/* + - pkgs/development/interpreters/luajit/**/* + - pkgs/development/lua-modules/**/* + - pkgs/top-level/lua-packages.nix + +"6.topic: nixos": + - nixos/**/* + +"6.topic: ocaml": + - doc/languages-frameworks/ocaml.section.md + - pkgs/development/compilers/ocaml/**/* + - pkgs/development/compilers/reason/**/* + - pkgs/development/ocaml-modules/**/* + - pkgs/development/tools/ocaml/**/* + - pkgs/top-level/ocaml-packages.nix + +"6.topic: pantheon": + - nixos/modules/services/desktops/pantheon/**/* + - nixos/modules/services/x11/desktop-managers/pantheon.nix + - nixos/modules/services/x11/display-managers/lightdm-greeters/pantheon.nix + - nixos/tests/pantheon.nix + - pkgs/desktops/pantheon/**/* + +"6.topic: policy discussion": + - .github/**/* + +"6.topic: printing": + - nixos/modules/services/printing/cupsd.nix + - pkgs/misc/cups/**/* + +"6.topic: python": + - doc/languages-frameworks/python.section.md + - pkgs/development/interpreters/python/**/* + - pkgs/development/python-modules/**/* + - pkgs/top-level/python-packages.nix + +"6.topic: qt/kde": + - doc/languages-frameworks/qt.section.md + - nixos/modules/services/x11/desktop-managers/plasma5.nix + - nixos/tests/plasma5.nix + - pkgs/applications/kde/**/* + - pkgs/desktops/plasma-5/**/* + - pkgs/development/libraries/kde-frameworks/**/* + - pkgs/development/libraries/qt-5/**/* + +"6.topic: ruby": + - doc/languages-frameworks/ruby.section.md + - pkgs/development/interpreters/ruby/**/* + - pkgs/development/ruby-modules/**/* + +"6.topic: rust": + - doc/languages-frameworks/rust.section.md + - pkgs/build-support/rust/**/* + - pkgs/development/compilers/rust/**/* + +"6.topic: stdenv": + - pkgs/stdenv/**/* + +"6.topic: steam": + - pkgs/games/steam/**/* + +"6.topic: systemd": + - pkgs/os-specific/linux/systemd/**/* + - nixos/modules/system/boot/systemd*/**/* + +"6.topic: TeX": + - doc/languages-frameworks/texlive.section.md + - pkgs/tools/typesetting/tex/**/* + +"6.topic: vim": + - doc/languages-frameworks/vim.section.md + - pkgs/applications/editors/vim/**/* + - pkgs/misc/vim-plugins/**/* + +"6.topic: xfce": + - nixos/doc/manual/configuration/xfce.xml + - nixos/modules/services/x11/desktop-managers/xfce.nix + - nixos/tests/xfce.nix + - pkgs/desktops/xfce/**/* + +"8.has: changelog": + - nixos/doc/manual/release-notes/**/* + +"8.has: documentation": + - doc/**/* + - nixos/doc/**/* + +"8.has: module (update)": + - nixos/modules/**/* diff --git a/nixpkgs/.github/workflows/editorconfig.yml b/nixpkgs/.github/workflows/editorconfig.yml index 270728a61c6f..c20ed3ab768d 100644 --- a/nixpkgs/.github/workflows/editorconfig.yml +++ b/nixpkgs/.github/workflows/editorconfig.yml @@ -25,7 +25,7 @@ jobs: - name: Fetch editorconfig-checker if: env.PR_DIFF env: - ECC_VERSION: "2.3.1" + ECC_VERSION: "2.3.5" ECC_URL: "https://github.com/editorconfig-checker/editorconfig-checker/releases/download" run: | curl -sSf -O -L -C - "$ECC_URL/$ECC_VERSION/ec-linux-amd64.tar.gz" && \ diff --git a/nixpkgs/.github/workflows/labels.yml b/nixpkgs/.github/workflows/labels.yml new file mode 100644 index 000000000000..4232ceb62368 --- /dev/null +++ b/nixpkgs/.github/workflows/labels.yml @@ -0,0 +1,15 @@ +name: "Label PR" + +on: + pull_request_target: + types: [edited, opened, synchronize, reopened] + +jobs: + labels: + runs-on: ubuntu-latest + if: github.repository_owner == 'NixOS' + steps: + - uses: actions/labeler@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + sync-labels: true diff --git a/nixpkgs/.github/workflows/manual-nixos.yml b/nixpkgs/.github/workflows/manual-nixos.yml index a75e84029301..fa1f8fc6911e 100644 --- a/nixpkgs/.github/workflows/manual-nixos.yml +++ b/nixpkgs/.github/workflows/manual-nixos.yml @@ -15,11 +15,11 @@ jobs: with: # pull_request_target checks out the base branch by default ref: refs/pull/${{ github.event.pull_request.number }}/merge - - uses: cachix/install-nix-action@v12 + - uses: cachix/install-nix-action@v13 with: # explicitly enable sandbox extra_nix_config: sandbox = true - - uses: cachix/cachix-action@v8 + - uses: cachix/cachix-action@v9 with: # This cache is for the nixos/nixpkgs manual builds and should not be trusted or used elsewhere. name: nixpkgs-ci diff --git a/nixpkgs/.github/workflows/manual-nixpkgs.yml b/nixpkgs/.github/workflows/manual-nixpkgs.yml index 7596719d9b50..192a4c6868a4 100644 --- a/nixpkgs/.github/workflows/manual-nixpkgs.yml +++ b/nixpkgs/.github/workflows/manual-nixpkgs.yml @@ -15,11 +15,11 @@ jobs: with: # pull_request_target checks out the base branch by default ref: refs/pull/${{ github.event.pull_request.number }}/merge - - uses: cachix/install-nix-action@v12 + - uses: cachix/install-nix-action@v13 with: # explicitly enable sandbox extra_nix_config: sandbox = true - - uses: cachix/cachix-action@v8 + - uses: cachix/cachix-action@v9 with: # This cache is for the nixos/nixpkgs manual builds and should not be trusted or used elsewhere. name: nixpkgs-ci diff --git a/nixpkgs/.github/workflows/rebase-staging.yml b/nixpkgs/.github/workflows/rebase-staging.yml deleted file mode 100644 index 41b06f95668a..000000000000 --- a/nixpkgs/.github/workflows/rebase-staging.yml +++ /dev/null @@ -1,60 +0,0 @@ -on: - issue_comment: - types: - - created - -# This action allows people with write access to the repo to rebase a PRs base branch from -# master to staging by commenting `/rebase-staging` on the PR while avoiding CODEOWNER notifications. - -jobs: - rebase: - runs-on: ubuntu-latest - if: github.repository_owner == 'NixOS' && github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase-staging') - steps: - - uses: peter-evans/create-or-update-comment@v1 - with: - comment-id: ${{ github.event.comment.id }} - reactions: eyes - - uses: scherermichael-oss/action-has-permission@1.0.6 - id: check-write-access - with: - required-permission: write - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: check base branch is master - if: steps.check-write-access.outputs.has-permission - run: | - if [ "$(curl https://api.github.com/repos/NixOS/nixpkgs/pulls/${{ github.event.issue.number }} | jq -r '.base.ref')" != "master" ]; then - echo "This action only works when the current base branch is master." - exit 1 - fi - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - if: steps.check-write-access.outputs.has-permission - - name: rebase pull request - if: steps.check-write-access.outputs.has-permission - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PULL_REQUEST: ${{ github.event.issue.number }} - run: | - git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" - git config --global user.name "github-actions[bot]" - git fetch origin - gh pr checkout "$PULL_REQUEST" - git rebase \ - --onto="$(git merge-base origin/master origin/staging)" \ - "HEAD~$(git rev-list --count HEAD ^master)" - git push --force - curl \ - -X POST \ - -H "Accept: application/vnd.github.v3+json" \ - -H "Authorization: token $GITHUB_TOKEN" \ - -d '{ "base": "staging" }' \ - "https://api.github.com/repos/NixOS/nixpkgs/pulls/$PULL_REQUEST" - - uses: peter-evans/create-or-update-comment@v1 - if: ${{ failure() }} - with: - issue-number: ${{ github.event.issue.number }} - body: | - [Failed to rebase on `staging`](https://github.com/NixOS/nixpkgs/actions/runs/${{ github.run_id }}) diff --git a/nixpkgs/.github/workflows/rebase.yml b/nixpkgs/.github/workflows/rebase.yml new file mode 100644 index 000000000000..50d066dd754f --- /dev/null +++ b/nixpkgs/.github/workflows/rebase.yml @@ -0,0 +1,134 @@ +on: + issue_comment: + types: + - created + +# This action allows people with write access to the repo to rebase a PRs base branch +# by commenting `/rebase ${branch}` on the PR while avoiding CODEOWNER notifications. + +jobs: + rebase: + runs-on: ubuntu-latest + if: github.repository_owner == 'NixOS' && github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase') + steps: + - uses: peter-evans/create-or-update-comment@v1 + with: + comment-id: ${{ github.event.comment.id }} + reactions: eyes + - uses: scherermichael-oss/action-has-permission@1.0.6 + id: check-write-access + with: + required-permission: write + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: check permissions + run: | + echo "Commenter doesn't have write access to the repo" + exit 1 + if: "! steps.check-write-access.outputs.has-permission" + - name: setup + run: | + curl "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.issue.number }}" 2>/dev/null >pr.json + cat <<EOF >>"$GITHUB_ENV" + CAN_MODIFY=$(jq -r '.maintainer_can_modify' pr.json) + COMMITS=$(jq -r '.commits' pr.json) + CURRENT_BASE=$(jq -r '.base.ref' pr.json) + PR_BRANCH=$(jq -r '.head.ref' pr.json) + COMMENT_BRANCH=$(echo ${{ github.event.comment.body }} | awk "/^\/rebase / {print \$2}") + PULL_REQUEST=${{ github.event.issue.number }} + EOF + rm pr.json + - name: check branch + env: + PERMANENT_BRANCHES: "haskell-updates|master|nixos|nixpkgs|python-unstable|release|staging" + VALID_BRANCHES: "haskell-updates|master|python-unstable|release-20.09|staging|staging-20.09|staging-next" + run: | + message() { + cat <<EOF + Can't rebase $PR_BRANCH from $CURRENT_BASE onto $COMMENT_BRANCH (PR:$PULL_REQUEST COMMITS:$COMMITS) + EOF + } + if ! [[ "$COMMENT_BRANCH" =~ ^($VALID_BRANCHES)$ ]]; then + cat <<EOF + Check that the branch from the comment is valid: + + $(message) + + This action can only rebase onto these branches: + + $VALID_BRANCHES + + \`/rebase \${branch}\` must be at the start of the line + EOF + exit 1 + fi + if [[ "$COMMENT_BRANCH" == "$CURRENT_BASE" ]]; then + cat <<EOF + Check that the branch from the comment isn't the current base branch: + + $(message) + EOF + exit 1 + fi + if [[ "$COMMENT_BRANCH" == "$PR_BRANCH" ]]; then + cat <<EOF + Check that the branch from the comment isn't the current branch: + + $(message) + EOF + exit 1 + fi + if [[ "$PR_BRANCH" =~ ^($PERMANENT_BRANCHES) ]]; then + cat <<EOF + Check that the PR branch isn't a permanent branch: + + $(message) + EOF + exit 1 + fi + if [[ "$CAN_MODIFY" != "true" ]]; then + cat <<EOF + Check that maintainers can edit the PR branch: + + $(message) + EOF + exit 1 + fi + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: rebase pull request + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" + git config --global user.name "github-actions[bot]" + git fetch origin + gh pr checkout "$PULL_REQUEST" + git rebase \ + --onto="$(git merge-base origin/"$CURRENT_BASE" origin/"$COMMENT_BRANCH")" \ + "HEAD~$COMMITS" + git push --force + curl \ + -X POST \ + -H "Accept: application/vnd.github.v3+json" \ + -H "Authorization: token $GITHUB_TOKEN" \ + -d "{ \"base\": \"$COMMENT_BRANCH\" }" \ + "https://api.github.com/repos/${{ github.repository }}/pulls/$PULL_REQUEST" + curl \ + -X PATCH \ + -H "Accept: application/vnd.github.v3+json" \ + -H "Authorization: token $GITHUB_TOKEN" \ + -d '{ "state": "closed" }' \ + "https://api.github.com/repos/${{ github.repository }}/pulls/$PULL_REQUEST" + - uses: peter-evans/create-or-update-comment@v1 + with: + issue-number: ${{ github.event.issue.number }} + body: | + Rebased, please reopen the pull request to restart CI + - uses: peter-evans/create-or-update-comment@v1 + if: failure() + with: + issue-number: ${{ github.event.issue.number }} + body: | + [Failed to rebase](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) |