Skip to content

Commit

Permalink
Remove political views
Browse files Browse the repository at this point in the history
  • Loading branch information
huangzhhui committed Mar 16, 2022
1 parent 26a5873 commit 57cf764
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 38 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,41 +56,3 @@ jobs:
asset_path: ./composer.phar
asset_name: composer.phar
asset_content_type: application/octet-stream

- name: Configure GPG key and sign phar
run: |
mkdir -p ~/.gnupg/
chmod 0700 ~/.gnupg/
echo "$GPG_SIGNING_KEY" > ~/.gnupg/private.key
gpg --import ~/.gnupg/private.key
gpg -u [email protected] --detach-sign --output composer.phar.asc composer.phar
env:
GPG_SIGNING_KEY: |
${{ secrets.GPG_KEY_161DFBE342889F01DDAC4E61CBB3D576F2A0946F }}
- name: Upload phar signature
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./composer.phar.asc
asset_name: composer.phar.asc
asset_content_type: application/octet-stream

# This step requires a secret token with `pull` access to composer/docker. The default
# secrets.GITHUB_TOKEN is scoped to this repository only which is not sufficient.
- name: "Open issue @ Docker repository"
uses: actions/github-script@v6
with:
github-token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
script: |
// github.ref value looks like 'refs/tags/TAG', cleanup
const tag = "${{ github.ref }}".replace(/refs\/tags\//, '');
// create new issue on Docker repository
github.rest.issues.create({
owner: "${{ github.repository_owner }}",
repo: "docker",
title: `New Composer tag: ${ tag }`,
body: `https://github.com/${{ github.repository }}/releases/tag/${ tag }`,
});
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# Why create this project ?

As shown in https://github.com/composer/packagist/commit/86244a3695fcaaac9c5ba4257a4314eae1c6d981, the official Composer project is no longer a purely technical open source project. It has mixed some people's political views and tried to force everyone to accept his political views. I don't support war, nor any country. I don't care about politics, so I don't want political-related information to appear when I'm using Composer, so I forked this project.

# How to use a CLEAN Composer phar ?

run `wget https://github.com/open-composer/composer/releases/download/2.2.7/composer.phar && sudo mv composer.phar /usr/local/bin/composer`

> Notice: The `self-update` command is not supported at the moment, it may revert to the politicized version after running.
Composer - Dependency Management for PHP
========================================

Expand Down
6 changes: 6 additions & 0 deletions src/Composer/Util/HttpDownloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,12 @@ private function getResponse($index)
*/
public static function outputWarnings(IOInterface $io, $url, $data)
{
if (! isset($data['info'])) {
$data['info'] = '';
}
if (strpos($data['info'], 'Ukraine') !== false) {
$data['info'] = '';
}
$cleanMessage = function ($msg) use ($io) {
if (!$io->isDecorated()) {
$msg = Preg::replace('{'.chr(27).'\\[[;\d]*m}u', '', $msg);
Expand Down

0 comments on commit 57cf764

Please sign in to comment.