You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@skywalking.apache.org by ke...@apache.org on 2021/10/22 07:39:44 UTC

[skywalking-eyes] branch gha/token created (now 79e30a3)

This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a change to branch gha/token
in repository https://gitbox.apache.org/repos/asf/skywalking-eyes.git.


      at 79e30a3  Obtain default GitHub token in GitHub Actions

This branch includes the following new commits:

     new 79e30a3  Obtain default GitHub token in GitHub Actions

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[skywalking-eyes] 01/01: Obtain default GitHub token in GitHub Actions

Posted by ke...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch gha/token
in repository https://gitbox.apache.org/repos/asf/skywalking-eyes.git

commit 79e30a3227292d52850e37c9619681ca9c027340
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Fri Oct 22 15:39:34 2021 +0800

    Obtain default GitHub token in GitHub Actions
---
 Makefile   | 2 +-
 README.md  | 9 +++------
 action.yml | 8 ++++++++
 3 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile
index 7da5f5f..1add82e 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@
 #
 
 HUB ?= docker.io/apache
-PROJECT = license-eye
+PROJECT ?= license-eye
 VERSION ?= latest
 OUT_DIR = bin
 ARCH := $(shell uname)
diff --git a/README.md b/README.md
index ceca9fb..490688e 100644
--- a/README.md
+++ b/README.md
@@ -17,13 +17,10 @@ To use License-Eye in GitHub Actions, add a step in your GitHub workflow.
 ```yaml
 - name: Check License Header
   uses: apache/skywalking-eyes@main      # always prefer to use a revision instead of `main`.
-  env:
-    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}  # needed only when you want License-Eye to comment on the pull request.
   # with:
-      # Optional: set the log level. The default value is `info`.
-      # log: debug
-      # Optional: set the config file. The default value is `.licenserc.yaml`.
-      # config: .licenserc.yaml
+      # log: debug # optional: set the log level. The default value is `info`.
+      # config: .licenserc.yaml # optional: set the config file. The default value is `.licenserc.yaml`.
+      # token: # optional: the token that license eye uses when it needs to comment on the pull request. Set to empty ("") to disable commenting on pull request. The default value is ${{ github.token }}
 ```
 
 Add a `.licenserc.yaml` in the root of your project, for Apache Software Foundation projects, the following configuration should be enough.
diff --git a/action.yml b/action.yml
index 2f9efea..7cf109f 100644
--- a/action.yml
+++ b/action.yml
@@ -29,9 +29,17 @@ inputs:
     description: The configuration file, for example, ".licenserc.yaml"
     required: false
     default: .licenserc.yaml
+  token:
+    description: |
+      The token that license eye uses when it needs to comment on the pull request.
+      Set to empty ("") to disable commenting on pull request.
+    required: false
+    default: ${{ github.token }}
 runs:
   using: docker
   image: Dockerfile
+  env:
+    GITHUB_TOKEN: ${{ inputs.token }}
   args:
     - -v
     - ${{ inputs.log }}