From cb49d4bbab4e0ff58edfcf4808e0cbddb3cf5183 Mon Sep 17 00:00:00 2001 From: Dr-Noob Date: Mon, 26 Jul 2021 13:06:47 +0200 Subject: [PATCH] [v0.98] Disable PR in github --- .github/workflows/lockdown.yml | 38 ++++++++++++++++++++++ CONTRIBUTING.md | 59 +++++++++++++++++----------------- README.md | 10 +++--- 3 files changed, 74 insertions(+), 33 deletions(-) create mode 100644 .github/workflows/lockdown.yml diff --git a/.github/workflows/lockdown.yml b/.github/workflows/lockdown.yml new file mode 100644 index 0000000..7f16f5b --- /dev/null +++ b/.github/workflows/lockdown.yml @@ -0,0 +1,38 @@ +name: 'Disable PR in cpufetch' + +on: + issues: + types: opened + pull_request: + types: opened + schedule: + - cron: '0 * * * *' + +permissions: + issues: write + pull-requests: write + +jobs: + action: + runs-on: ubuntu-latest + steps: + - uses: dessant/repo-lockdown@v2 + with: + github-token: ${{ github.token }} + exclude-issue-created-before: '' + exclude-issue-labels: '' + issue-labels: '' + issue-comment: '' + skip-closed-issue-comment: false + close-issue: false + lock-issue: true + issue-lock-reason: '' + exclude-pr-created-before: '' + exclude-pr-labels: '' + pr-labels: '' + pr-comment: 'cpufetch does not accept pull requests, see [the contributing guidelines](https://github.com/Dr-Noob/cpufetch/blob/master/CONTRIBUTING.md) for details' + skip-closed-pr-comment: false + close-pr: true + lock-pr: false + pr-lock-reason: '' + process-only: 'prs' diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b90e340..e89b8a0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,49 +3,50 @@ - -- [Creating a pull request](#creating-a-pull-request) - - [Case 1: I found a bug in cpufetch](#case-1-i-found-a-bug-in-cpufetch) - - [Case 2: I have an idea for a new feature in cpufetch / I want to suggest a change in cpufetch](#case-2-i-have-an-idea-for-a-new-feature-in-cpufetch--i-want-to-suggest-a-change-in-cpufetch) - - [Case 3: I want to make changes to the Makefile](#case-3-i-want-to-make-changes-to-the-makefile) -- [Creating an issue](#creating-an-issue) - - [cpufetch fails / crashes with a segmentation fault / ends without any output](#cpufetch-fails--crashes-with-a-segmentation-fault--ends-without-any-output) - - [Option 1 (best)](#option-1-best) - - [Option 2 (use this option if you can't work with option 1)](#option-2-use-this-option-if-you-cant-work-with-option-1) +- [1. cpufetch does not accept pull requests](#1-cpufetch-does-not-accept-pull-requests) +- [2. Creating an issue](#2-creating-an-issue) + - [2.1: I found a bug in cpufetch (the program provides incorrect / invalid information)](#21-i-found-a-bug-in-cpufetch-the-program-provides-incorrect--invalid-information) + - [2.2: I found a bug in cpufetch (the program crashes / does not work properly)](#22-i-found-a-bug-in-cpufetch-the-program-crashes--does-not-work-properly) + - [Stacktrace option 1 (best)](#stacktrace-option-1-best) + - [Stacktrace option 2 (use this option if option 1 does not work)](#stacktrace-option-2-use-this-option-if-option-1-does-not-work) + - [2.3: I have an idea for a new feature in cpufetch / I want to suggest a change in cpufetch](#23-i-have-an-idea-for-a-new-feature-in-cpufetch--i-want-to-suggest-a-change-in-cpufetch) +Thanks for your interest in contributing to cpufetch! Please, read this page carefully to understand how to contribute to cpufetch. -## Creating a pull request +## 1. cpufetch does not accept pull requests +cpufetch is a small project, and I enjoy developing it. There are for sure some bugs and exciting features to add, but I prefer to make these +changes myself. For that reason, you should always use the issues page to report anything related to cpufetch. In the rare case that there is +a concise bug or feature that I am unable to implement myself, I will enable pull requests for this. -Thanks for your interest in contributing to cpufetch! +## 2. Creating an issue -What kind of contribution are you going to propose? +### 2.1: I found a bug in cpufetch (the program provides incorrect / invalid information) +In the github issue **you must include**: +- Exact CPU model. +- Operating system. +- The output of `cpufetch`. +- The output of `cpufetch --debug`. -### Case 1: I found a bug in cpufetch -If you found a bug, please don't open a pull request; open an issue instead, even if you know the solution. I appreciate people finding bugs, but I generally prefer to fix them myself. +### 2.2: I found a bug in cpufetch (the program crashes / does not work properly) +- Exact CPU model. +- Operating system. +- The output of `cpufetch`. +- The output of `cpufetch --debug`. +- A stacktrace (if program crashes): -### Case 2: I have an idea for a new feature in cpufetch / I want to suggest a change in cpufetch -Great! Make a PR and make sure to explain how did you implement your new feature on the github conversation page. - -### Case 3: I want to make changes to the Makefile -Don't open a pull request; open an issue instead and suggest your changes in the Makefile there. Except for extraordinary cases, I will not accept changes in the Makefile. - -## Creating an issue - -If you are going to report a bug or problem, always report the CPU model and OS. If possible, also paste the output of `cpufetch` and `cpufetch --debug`. - -### cpufetch fails / crashes with a segmentation fault / ends without any output -You need to provide additional information in the github issue: - -#### Option 1 (best) +#### Stacktrace option 1 (best) 1. Build cpufetch with debug symbols (`make clean; make debug`). 2. Install valgrind (if it is not already installed) 3. Run cpufetch with valgrind (`valgrind ./cpufetch`) 4. Paste the complete output (preferably on a platform like pastebin) -#### Option 2 (use this option if you can't work with option 1) +#### Stacktrace option 2 (use this option if option 1 does not work) 1. Build cpufetch with debug symbols (`make clean; make debug`). 2. Install gdb (if it is not already installed) 3. Debug cpufetch with gdb (`gdb cpufetch`) 3. Run cpufetch (just r inside gdb console) 4. Paste the complete output (preferably on a platform like pastebin) + +### 2.3: I have an idea for a new feature in cpufetch / I want to suggest a change in cpufetch +Just explain the feature in the issue and include references (links) to relevant sources if appropriate. diff --git a/README.md b/README.md index 3d92323..8dd21d9 100644 --- a/README.md +++ b/README.md @@ -103,10 +103,12 @@ specifying Intel or AMD, or specifying the colors in RGB format: In the case of setting the colors using RGB, 4 colors must be given in with the format: ``[R,G,B:R,G,B:R,G,B:R,G,B]``. These colors correspond to CPU art color (2 colors) and for the text colors (following 2). Thus, you can customize all the colors. # 5. Implementation - -See [cpufetch programming documentation](https://github.com/Dr-Noob/cpufetch/blob/master/doc/README.md). +See [cpufetch programming documentation](https://github.com/Dr-Noob/cpufetch/doc/README.md). # 6. Bugs or improvements -There are many open issues in github (see [issues](https://github.com/Dr-Noob/cpufetch/issues)). Feel free to open a new one report an issue or propose any improvement in `cpufetch` +See [cpufetch contributing guidelines](https://github.com/Dr-Noob/cpufetch/CONTRIBUTING.md) -I would like to thank [Gonzalocl](https://github.com/Gonzalocl) and [OdnetninI](https://github.com/OdnetninI) for their help, running `cpufetch` in many different CPUs they have access to, which makes it easier to debug and check the correctness of `cpufetch`. +# 7. Acknowledgements +Special thanks to [Gonzalocl](https://github.com/Gonzalocl) and [OdnetninI](https://github.com/OdnetninI). They tested `cpufetch` in its beginnings in many different CPUs they have access to, which made it easier to debug and check the correctness of `cpufetch`. + +Special thanks too to the fellow contributors and interested people in the project!