From fc63fc018416442c2b0c08e7d7445cd5fd02b7f1 Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Mon, 6 May 2024 20:47:16 +0330 Subject: [PATCH 01/53] Delete .github/workflows directory --- .github/workflows/ci.yml | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index a429a2a98..000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,38 +0,0 @@ -# This workflow will build a Java project with Gradle -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle - -name: Java CI with Gradle - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build-java: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: 1.8 - - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - - name: Build with Gradle - run: ./gradlew build - - - name: Build and Push Docker Image - uses: mr-smithers-excellent/docker-build-push@v4 - with: - image: nanajanashia/demo-app - registry: docker.io - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - From dbe3beed6519e469b6bc7e681f0dfd900402bc1d Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Tue, 7 May 2024 00:09:47 +0330 Subject: [PATCH 02/53] Create CI.yml --- .github/workflows/CI.yml | 67 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 .github/workflows/CI.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 000000000..9ffb2c2ec --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,67 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle + +name: Java CI with Gradle + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + # Configure Gradle for optimal use in GiHub Actions, including caching of downloaded dependencies. + # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md + - name: Setup Gradle + uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 + + - name: Build with Gradle Wrapper + run: ./gradlew build + + # NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html). + # If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version. + # + # - name: Setup Gradle + # uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 + # with: + # gradle-version: '8.5' + # + # - name: Build with Gradle 8.5 + # run: gradle build + + dependency-submission: + + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + # Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies. + # See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md + - name: Generate and submit dependency graph + uses: gradle/actions/dependency-submission@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 From e66a48e764d200d3b17acdc5ab36568fe83e3f76 Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Tue, 7 May 2024 00:28:02 +0330 Subject: [PATCH 03/53] Update CI.yml --- .github/workflows/CI.yml | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 9ffb2c2ec..3b5d14736 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -27,15 +27,13 @@ jobs: with: java-version: '17' distribution: 'temurin' + - name: Grant execute permission for gradlew + run: chmod +x gradlew - # Configure Gradle for optimal use in GiHub Actions, including caching of downloaded dependencies. - # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md - - name: Setup Gradle - uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 - - - name: Build with Gradle Wrapper + - name: Build with Gradle run: ./gradlew build + # NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html). # If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version. # @@ -47,21 +45,3 @@ jobs: # - name: Build with Gradle 8.5 # run: gradle build - dependency-submission: - - runs-on: ubuntu-latest - permissions: - contents: write - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'temurin' - - # Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies. - # See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md - - name: Generate and submit dependency graph - uses: gradle/actions/dependency-submission@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 From 5e73555ef78328bbb1311c249cc3092bc4702fad Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Tue, 7 May 2024 00:29:53 +0330 Subject: [PATCH 04/53] Update CI.yml --- .github/workflows/CI.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3b5d14736..0fc072c34 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -22,11 +22,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 with: - java-version: '17' - distribution: 'temurin' + java-version: 1.8 - name: Grant execute permission for gradlew run: chmod +x gradlew From 78bd15c90fd14a3ee85b4270ab41ad949e403991 Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Tue, 7 May 2024 01:26:20 +0330 Subject: [PATCH 05/53] Update CI.yml --- .github/workflows/CI.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0fc072c34..fdf07952e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -17,6 +17,9 @@ jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + os: [windows-latest,ubunto-latest-macos-latest] permissions: contents: read From b37d6b781a21897792f1d55ff8888b5e673d02af Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Tue, 7 May 2024 01:29:35 +0330 Subject: [PATCH 06/53] Run the workflow at the same time on three different OS --- .github/workflows/CI.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index fdf07952e..be435b4d7 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - os: [windows-latest,ubunto-latest-macos-latest] + os: [windows-latest,ubunto-latest,macos-latest] permissions: contents: read @@ -35,7 +35,6 @@ jobs: - name: Build with Gradle run: ./gradlew build - # NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html). # If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version. # From 271e2d2c466391ad4e4f8d10e3d6feb1e053bd38 Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Tue, 7 May 2024 13:48:10 +0330 Subject: [PATCH 07/53] Run the workflow on a local runner(aws) --- .github/workflows/CI.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index be435b4d7..ccf7d807d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -16,10 +16,10 @@ on: jobs: build: - runs-on: ubuntu-latest - strategy: - matrix: - os: [windows-latest,ubunto-latest,macos-latest] + runs-on: local_runner_aws +# strategy: +# matrix: +# os: [windows-latest,ubunto-latest,macos-latest] permissions: contents: read From b77ea08fe1009a7efc301011c79f70430751a662 Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Tue, 7 May 2024 13:54:45 +0330 Subject: [PATCH 08/53] Updated the label of local runner --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ccf7d807d..56251fbfe 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -16,7 +16,7 @@ on: jobs: build: - runs-on: local_runner_aws + runs-on: self-hosted # strategy: # matrix: # os: [windows-latest,ubunto-latest,macos-latest] From 86cf77327bbb02fff20375516482c83ac89d3300 Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Mon, 20 May 2024 22:55:51 +0330 Subject: [PATCH 09/53] run on faps-scalable-runner --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 56251fbfe..49f2eea83 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -16,7 +16,7 @@ on: jobs: build: - runs-on: self-hosted + runs-on: faps-scalable-runner # strategy: # matrix: # os: [windows-latest,ubunto-latest,macos-latest] From a032cc749c1fbffbe63f8fee301572b174709e16 Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Tue, 4 Jun 2024 18:41:15 +0330 Subject: [PATCH 10/53] build image and push to Dockerhub --- .github/workflows/CI.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 49f2eea83..6e82a1aca 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -35,6 +35,15 @@ jobs: - name: Build with Gradle run: ./gradlew build + - uses: mr-smithers-excellent/docker-build-push@v6 + name: Build & push Docker image + with: + image: anoshrz/java_project + tags: v1, latest + registry: docker.io + dockerfile: Dockerfile + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} # NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html). # If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version. # From 194f095f717577abf962fcd22ae26d39749d6843 Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Tue, 4 Jun 2024 18:42:07 +0330 Subject: [PATCH 11/53] run on github runner --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 6e82a1aca..dd1088c93 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -16,7 +16,7 @@ on: jobs: build: - runs-on: faps-scalable-runner + runs-on: ubunto-latest # strategy: # matrix: # os: [windows-latest,ubunto-latest,macos-latest] From 13b80203a173c65ae4b43ca585346b43b00ec2c8 Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Tue, 4 Jun 2024 18:53:25 +0330 Subject: [PATCH 12/53] build image and push to Dockerhub using FAPS-turing --- .github/workflows/CI.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index dd1088c93..659e3729e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -16,7 +16,7 @@ on: jobs: build: - runs-on: ubunto-latest + runs-on: faps-turing # strategy: # matrix: # os: [windows-latest,ubunto-latest,macos-latest] @@ -35,8 +35,8 @@ jobs: - name: Build with Gradle run: ./gradlew build - - uses: mr-smithers-excellent/docker-build-push@v6 - name: Build & push Docker image + - name: Build & push Docker image + uses: mr-smithers-excellent/docker-build-push@v6 with: image: anoshrz/java_project tags: v1, latest From e41ef7b858cfb865be32fb79e8886908a6abc630 Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Tue, 4 Jun 2024 19:00:30 +0330 Subject: [PATCH 13/53] run on github runner --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 659e3729e..f1fae1b4b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -16,7 +16,7 @@ on: jobs: build: - runs-on: faps-turing + runs-on: ubunto-latest # strategy: # matrix: # os: [windows-latest,ubunto-latest,macos-latest] From 9744b12677e230388e8d2d7bb1a710d477afb021 Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Tue, 4 Jun 2024 19:13:29 +0330 Subject: [PATCH 14/53] build image and push to Dockerhub using github runner --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f1fae1b4b..9ae1c039a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -16,7 +16,7 @@ on: jobs: build: - runs-on: ubunto-latest + runs-on: ubuntu-latest # strategy: # matrix: # os: [windows-latest,ubunto-latest,macos-latest] From a0697811551baea54e651a1d3b39dfde34ed5e3f Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Tue, 4 Jun 2024 19:16:49 +0330 Subject: [PATCH 15/53] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d2b1dc574..a382a2311 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM openjdk:8-jre-alpine EXPOSE 8080 -COPY ./build/libs/my-app-1.0-SNAPSHOT.jar /usr/app/ +#COPY ./build/libs/my-app-1.0-SNAPSHOT.jar /usr/app/ WORKDIR /usr/app ENTRYPOINT ["java", "-jar", "my-app-1.0-SNAPSHOT.jar"] From bd4d9f23eb3cd2f69eb7041b331e716efcbece74 Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Thu, 6 Jun 2024 18:11:29 +0330 Subject: [PATCH 16/53] Create a publish job --- .github/workflows/CI.yml | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 9ae1c039a..633a66a1b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -34,16 +34,20 @@ jobs: - name: Build with Gradle run: ./gradlew build - - - name: Build & push Docker image - uses: mr-smithers-excellent/docker-build-push@v6 - with: - image: anoshrz/java_project - tags: v1, latest - registry: docker.io - dockerfile: Dockerfile - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + publish: + runs-on: ubuntu-latest + needs: build + + steps: + - name: Build & push Docker image + uses: mr-smithers-excellent/docker-build-push@v6 + with: + image: anoshrz/java_project + tags: latest + registry: docker.io + dockerfile: Dockerfile + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} # NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html). # If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version. # From 168c4d518e70cd4caf024fa6f957635b51009c59 Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Thu, 6 Jun 2024 18:20:49 +0330 Subject: [PATCH 17/53] Update CI.yml --- .github/workflows/CI.yml | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 633a66a1b..95a45e2de 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -34,20 +34,16 @@ jobs: - name: Build with Gradle run: ./gradlew build - publish: - runs-on: ubuntu-latest - needs: build - - steps: - - name: Build & push Docker image - uses: mr-smithers-excellent/docker-build-push@v6 - with: - image: anoshrz/java_project - tags: latest - registry: docker.io - dockerfile: Dockerfile - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build & push Docker image + uses: mr-smithers-excellent/docker-build-push@v6 + with: + image: anoshrz/java_project + tags: latest + registry: docker.io + dockerfile: Dockerfile + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} # NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html). # If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version. # From 3cea42861254b68d58e40779f0a0751edad96bed Mon Sep 17 00:00:00 2001 From: Anosh Rezaei Date: Thu, 6 Jun 2024 17:27:21 +0200 Subject: [PATCH 18/53] added new .py files to project Signed-off-by: Anosh Rezaei --- src/python/preprocessing.py | 33 +++ src/python/stackoverflow_extractor.py | 314 ++++++++++++++++++++++++++ 2 files changed, 347 insertions(+) create mode 100644 src/python/preprocessing.py create mode 100644 src/python/stackoverflow_extractor.py diff --git a/src/python/preprocessing.py b/src/python/preprocessing.py new file mode 100644 index 000000000..6dbb91cef --- /dev/null +++ b/src/python/preprocessing.py @@ -0,0 +1,33 @@ +import pandas as pd + + +def merge_data(): + + # Paths to the CSV files + csv_file_1 = "sources/qa.csv" # Answer + csv_file_2 = "sources/cncf_stackoverflow_qas.csv" # answer + + # Read the CSV files + df1 = pd.read_csv(csv_file_1) + df2 = pd.read_csv(csv_file_2) + + # Select and rename the columns of interest from the first file + df1_selected = df1[["Question", "Answer", "Project"]] + + # Select and rename the columns of interest from the second file + + df2_selected = df2[["question", "answer", "tag"]].rename( + columns={"question": "Question", "answer": "Answer", "tag": "Project"} + ) + + # Concatenate the selected and renamed columns + merged_df = pd.concat([df1_selected, df2_selected]) + + # Save the merged DataFrame to a new CSV file + merged_df.to_csv("merged_qas.csv", index=False) + + print("Columns merged and saved successfully!") + + +if __name__ == "__main__": + merge_data() diff --git a/src/python/stackoverflow_extractor.py b/src/python/stackoverflow_extractor.py new file mode 100644 index 000000000..66f48543e --- /dev/null +++ b/src/python/stackoverflow_extractor.py @@ -0,0 +1,314 @@ +import yaml +import requests +import pandas as pd +from bs4 import BeautifulSoup +import time +import json +import os +import sys +from datetime import datetime, timedelta + +API_KEY = '' # Replace with your actual API key of stackexchange +REQUEST_DELAY = 0 # Number of seconds to wait between requests +PROGRESS_FILE = 'sources/stackoverflow_progress.json' +CSV_FILE = 'sources/cncf_stackoverflow_qas.csv' +PROCESSED_IDS_FILE = 'sources/processed_question_ids.json' +TAGS_FILE = 'sources/tags.json' +TAGS_UPDATE_INTERVAL = 7 # Number of days between tag updates +DAILY_REQUEST_LIMIT = 9000 + + +def fetch_with_backoff(api_url, params): + """Fetch data from the API with exponential backoff for rate limiting. + + Args: + api_url (str): The API endpoint URL. + params (dict): Dictionary of query parameters for the API request. + + Returns: + dict: The JSON response data from the API if successful. + None: If the API request fails. + """ + while True: + # print(f"Fetching data with params: {params}") + response = requests.get(api_url, params=params) + if response.status_code == 200: + return response.json() + elif response.status_code == 429: + print("Rate limit exceeded. Waiting for retry...") + retry_after = int(response.headers.get('retry-after', REQUEST_DELAY)) + sys.exit() + else: + print(f"Failed to fetch data: {response.status_code} - {response.text}") + sys.exit() + return None + +def qa_extractor(request_count, tag, start_page, page_size=100,): + """Fetch questions from StackOverflow for a given tag. + + Args: + request_count (int): Current count of API requests made. + tag (str): The tag to search for on StackOverflow. + start_page (int): The starting page number for the API request. + page_size (int, optional): Number of results per page. Defaults to 100. + + + Returns: + int: Updated request count after fetching questions. + """ + + api_url = "https://api.stackexchange.com/2.3/search/advanced" + questions = [] + + # Load processed question IDs + processed_question_ids = load_processed_question_ids() + + while True: + if request_count >= DAILY_REQUEST_LIMIT: + break + + params = { + 'page': start_page, + 'pagesize': page_size, + 'order': 'desc', + 'sort': 'activity', + 'answers': 1, + 'tagged': tag, + 'site': 'stackoverflow', + 'filter': 'withbody', # Ensuring the 'body' field is included + 'key': API_KEY + } + + response_data = fetch_with_backoff(api_url, params) + request_count += 1 + if not response_data or not response_data['items']: + save_progress(tag, "null") + break + QA_list = [] + if response_data: + questions.extend(response_data['items']) + + for question in response_data['items']: + question_id = question['question_id'] + if question_id in processed_question_ids: + continue + if question['answer_count'] > 0: + question_text = remove_html_tags(question['body']) + request_count += 1 + + answers = fetch_answers(question_id) + # formatted_answers = [] + + for count, answer in enumerate(answers, start=1): + if count > 3: + break + if answer['score'] < 0: + continue + answer_text = remove_html_tags(answer['body']) + # formatted_answers.append(f"{count}. {answer_text}") + + QA_list.append({ + "question": question_text, + # "answer": "\n".join(formatted_answers), + "answer": answer_text, + "tag": tag, + }) + + # Add question ID to the set of processed IDs + processed_question_ids.add(question_id) + + has_more = response_data.get('has_more', False) + if not has_more: + save_progress(tag, "finished") + break + + print(f"Fetched {len(response_data['items'])} questions from page {start_page} for tag '{tag}'. Total so far: {len(questions)}") + save_to_csv(QA_list, CSV_FILE) + save_processed_question_ids(processed_question_ids) + start_page += 1 + save_progress(tag, start_page) + time.sleep(REQUEST_DELAY) # Add delay between requests to avoid rate limiting + else: + break + if request_count >= DAILY_REQUEST_LIMIT: + # print(f"Request count is: {request_count}") + break + + print(f"Request count for question is: {request_count}") + return request_count + +def fetch_answers(question_id): + """Fetch answers for a specific question from StackOverflow. + + Args: + question_id (int): The ID of the question to fetch answers for. + + Returns: + list: List of answer items if successful, otherwise an empty list. + """ + api_url = f"https://api.stackexchange.com/2.3/questions/{question_id}/answers" + params = { + 'order': 'desc', + 'sort': 'votes', + 'site': 'stackoverflow', + 'filter': 'withbody', # Ensuring the 'body' field is included + 'key': API_KEY + } + + response_data = fetch_with_backoff(api_url, params) + return response_data['items'] if response_data else [] + +def remove_html_tags(text): + """Remove HTML tags from a given text. + + Args: + text (str): The HTML text to be processed. + + Returns: + str: The text with HTML tags removed. + """ + soup = BeautifulSoup(text, "html.parser") + return soup.get_text() + +def extract_all_projects(tags, request_count): + """Extract QA pairs for multiple tags. + + Args: + tags (list): List of tags to process. + request_count (int): Initial count of API requests made. + """ + progress = load_progress() + all_tags_done = True # Flag to check if all tags are done + for tag in tags: + if progress.get(tag) == "null" or progress.get(tag) == "finished": + continue + else: + all_tags_done = False # Found a tag that needs processing + start_page = progress.get(tag, 1) + + request_count = qa_extractor(request_count, tag, start_page=start_page) + if request_count >= DAILY_REQUEST_LIMIT: + break + if all_tags_done: + print("We have reached all question-answer data from StackOverflow.") + +def save_to_csv(data, filename): + """Save extracted data to a CSV file. + + Args: + data (list): List of dictionaries containing QA data. + filename (str): The filename for the CSV file. + """ + if os.path.exists(filename) and os.path.getsize(filename) > 0: + try: + df = pd.read_csv(filename) + df = pd.concat([df, pd.DataFrame(data)], ignore_index=True) + except pd.errors.EmptyDataError: + df = pd.DataFrame(data) + else: + df = pd.DataFrame(data) + df.to_csv(filename, index=False) + # print(f"Data saved to {filename}") + +def load_progress(): + """Load progress data from file. + + Returns: + dict: Dictionary containing progress data. + """ + try: + with open(PROGRESS_FILE, 'r') as f: + data = json.load(f) + return data + except FileNotFoundError: + print(f"File {PROGRESS_FILE} not found.") + return {} + except json.JSONDecodeError: + print(f"Error decoding JSON data in {PROGRESS_FILE}.") + return {} + +def save_progress(tag, page): + """Save progress data to file. + + Args: + tag (str): The tag being processed. + page (str or int): The current page number or status. + """ + progress = load_progress() + progress[tag] = page + with open(PROGRESS_FILE, 'w') as f: + json.dump(progress, f) + +def load_processed_question_ids(): + """Load processed question IDs from file. + + Returns: + set: Set of processed question IDs. + """ + try: + if os.path.getsize(PROCESSED_IDS_FILE) == 0: + return set() + with open(PROCESSED_IDS_FILE, 'r') as f: + return set(json.load(f)) + except FileNotFoundError: + return set() + except json.JSONDecodeError: + return set() + +def save_processed_question_ids(processed_ids): + """Save processed question IDs to file. + + Args: + processed_ids (set): Set of processed question IDs. + """ + with open(PROCESSED_IDS_FILE, 'w') as f: + json.dump(list(processed_ids), f) + +def load_tags(): + """Load tags from the JSON file if it's not older than the update interval, otherwise from the YAML file. + + Returns: + list: List of tags. + """ + if os.path.exists(TAGS_FILE): + with open(TAGS_FILE, 'r') as f: + tags_data = json.load(f) + last_update = datetime.strptime(tags_data['last_update'], "%Y-%m-%d") + if datetime.now() - last_update < timedelta(days=TAGS_UPDATE_INTERVAL): + return tags_data['tags'] + + # If the JSON file doesn't exist or is older than the update interval, load from YAML + with open("sourcesl/andscape_augmented.yml", 'r') as f: + data = yaml.safe_load(f) + + tags = [] + # Initialize a dictionary to save tags corresponding to each file + tags_dict = {'Project_name': ""} + # Process the loaded data + for category in data['landscape']: + category_list = ["App Definition and Development", "Orchestration & Management", "Runtime", \ + "Provisioning", "Observability and Analysis", "Test_Provisioning"] + if category['name'] not in category_list: + continue + tags_dict['Category'] = category['name'] + for subcategory in category.get('subcategories', []): + for item in subcategory.get('items', []): + project_name = item['name'].split('(')[0].strip() + tags_dict['Project_name'] = project_name + tags.append(tags_dict['Project_name']) + + # Save the tags to the JSON file with the current date + tags_data = { + 'tags': tags, + 'last_update': datetime.now().strftime("%Y-%m-%d") + } + with open(TAGS_FILE, 'w') as f: + json.dump(tags_data, f) + + return tags + +if __name__ == "__main__": + tags = load_tags() + request_count = 0 + # Extract and save QA pairs incrementally + extract_all_projects(tags, request_count) From 7e97e37d4ec80717b8572c7d1bbc9b64778e4a63 Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Fri, 7 Jun 2024 13:46:30 +0330 Subject: [PATCH 19/53] Create lint.yml --- .github/workflows/lint.yml | 51 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 000000000..78e118c2e --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,51 @@ +name: Lint and Format Code + +on: + push: + paths: + - 'src/python/**' + - '.github/workflows/lint.yml' + +jobs: + lint-and-format: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.8' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install black pylint + + - name: Format code with Black + run: black . + + - name: Run pylint + id: lint + continue-on-error: true + run: pylint your_project_directory > pylint_report.txt + + - name: Send code rating to slack + run: | + RATING=$(grep -oP "Your code has been rated at \K[0-9\.]+/[0-9\.]+" pylint_report.txt) + curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"Your code rating of your recent push is: ${RATING}\"}" ${{ secrets.SLACK_WEBHOOK_URL }} + + - name: Check for critical pylint errors + id: pylint_check + run: | + if grep -E "(syntax-error|fatal)" pylint_report.txt; then + exit 1 + fi + + - name: Send Slack notification on failure + if: steps.pylint_check.outcome == 'failure' + run: | + ERROR_MSG=$(grep -E "(syntax-error|fatal)" pylint_report.txt) + curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"Critical linting errors found in the code. Please check the logs for details:\n\`\`\`$ERROR_MSG\`\`\`\"}" ${{ secrets.SLACK_WEBHOOK_URL }} From b3ba53629e367254efbbff96479513745bb5414b Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Fri, 7 Jun 2024 13:49:09 +0330 Subject: [PATCH 20/53] ignore paths added --- .github/workflows/CI.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 95a45e2de..06277b35d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -10,6 +10,9 @@ name: Java CI with Gradle on: push: branches: [ "master" ] + paths-ignore: + - 'src/python/**' + - '.github/workflows/lint.yml' pull_request: branches: [ "master" ] From ed449cd11e594ff1c4eed6891fb348e557d747ca Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Fri, 7 Jun 2024 13:53:29 +0330 Subject: [PATCH 21/53] corrected path --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 78e118c2e..ad078dcea 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -30,7 +30,7 @@ jobs: - name: Run pylint id: lint continue-on-error: true - run: pylint your_project_directory > pylint_report.txt + run: pylint . > pylint_report.txt - name: Send code rating to slack run: | From c10c9719a9886325b5ed0867ad564d42bbdf016b Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Fri, 7 Jun 2024 13:58:23 +0330 Subject: [PATCH 22/53] Update lint.yml --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ad078dcea..b6c0d16ee 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -30,7 +30,7 @@ jobs: - name: Run pylint id: lint continue-on-error: true - run: pylint . > pylint_report.txt + run: pylint . - name: Send code rating to slack run: | From 9d6d537fceb98aa98db943f94b8298b4e330bcef Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Fri, 7 Jun 2024 14:07:25 +0330 Subject: [PATCH 23/53] Update lint.yml --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b6c0d16ee..3c576b4d7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -30,7 +30,7 @@ jobs: - name: Run pylint id: lint continue-on-error: true - run: pylint . + run: pylint ./**/**.py - name: Send code rating to slack run: | From aa7725812dca890949eb0e95ecf66263b6587907 Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Fri, 7 Jun 2024 14:09:26 +0330 Subject: [PATCH 24/53] Update lint.yml --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3c576b4d7..be7ec1a05 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -30,7 +30,7 @@ jobs: - name: Run pylint id: lint continue-on-error: true - run: pylint ./**/**.py + run: pylint ./**/**.py > pylint_report.txt - name: Send code rating to slack run: | From bdf222ce7c39d61dcb7a28e55cb78f05a6976728 Mon Sep 17 00:00:00 2001 From: Anosh Rezaei Date: Fri, 7 Jun 2024 13:13:05 +0200 Subject: [PATCH 25/53] a test syntax error Signed-off-by: Anosh Rezaei --- src/python/preprocessing.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/python/preprocessing.py b/src/python/preprocessing.py index 6dbb91cef..bd16bb21b 100644 --- a/src/python/preprocessing.py +++ b/src/python/preprocessing.py @@ -31,3 +31,4 @@ def merge_data(): if __name__ == "__main__": merge_data() + print(test_wrong_value) From 672b4e61c256af60180581616d93ca72d21da7ff Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Fri, 7 Jun 2024 14:52:47 +0330 Subject: [PATCH 26/53] Update lint.yml --- .github/workflows/lint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index be7ec1a05..716fef0d9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -41,6 +41,7 @@ jobs: id: pylint_check run: | if grep -E "(syntax-error|fatal)" pylint_report.txt; then + echo "Critical pylint errors found in the code. Please check pylint_report.txt for details." exit 1 fi From c2433dc5141910ae8e9dbe86a56bd20896bce1cd Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Fri, 7 Jun 2024 15:31:38 +0330 Subject: [PATCH 27/53] Update lint.yml --- .github/workflows/lint.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 716fef0d9..a3d702a87 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -40,13 +40,15 @@ jobs: - name: Check for critical pylint errors id: pylint_check run: | - if grep -E "(syntax-error|fatal)" pylint_report.txt; then + + if grep -E "^E[0-9]+" pylint_report.txt; then echo "Critical pylint errors found in the code. Please check pylint_report.txt for details." + echo $steps.pylint_check.outcome exit 1 fi - name: Send Slack notification on failure if: steps.pylint_check.outcome == 'failure' run: | - ERROR_MSG=$(grep -E "(syntax-error|fatal)" pylint_report.txt) + ERROR_MSG=$(grep -E "^E[0-9]+" pylint_report.txt) curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"Critical linting errors found in the code. Please check the logs for details:\n\`\`\`$ERROR_MSG\`\`\`\"}" ${{ secrets.SLACK_WEBHOOK_URL }} From 574d563079d6cc91d04114de2b2394ce5c4e0c28 Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Fri, 7 Jun 2024 15:33:06 +0330 Subject: [PATCH 28/53] Update lint.yml --- .github/workflows/lint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a3d702a87..61baa13b0 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -41,7 +41,7 @@ jobs: id: pylint_check run: | - if grep -E "^E[0-9]+" pylint_report.txt; then + if grep -E "E[0-9]+" pylint_report.txt; then echo "Critical pylint errors found in the code. Please check pylint_report.txt for details." echo $steps.pylint_check.outcome exit 1 @@ -50,5 +50,5 @@ jobs: - name: Send Slack notification on failure if: steps.pylint_check.outcome == 'failure' run: | - ERROR_MSG=$(grep -E "^E[0-9]+" pylint_report.txt) + ERROR_MSG=$(grep -E "E[0-9]+" pylint_report.txt) curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"Critical linting errors found in the code. Please check the logs for details:\n\`\`\`$ERROR_MSG\`\`\`\"}" ${{ secrets.SLACK_WEBHOOK_URL }} From dd656fb73395c9183e60955451ba4345c40e7ef9 Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Fri, 7 Jun 2024 15:35:57 +0330 Subject: [PATCH 29/53] Update lint.yml --- .github/workflows/lint.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 61baa13b0..532f38f74 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -43,12 +43,12 @@ jobs: if grep -E "E[0-9]+" pylint_report.txt; then echo "Critical pylint errors found in the code. Please check pylint_report.txt for details." - echo $steps.pylint_check.outcome - exit 1 + ERROR_MSG=$(grep -E "E[0-9]+" pylint_report.txt) + curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"Critical linting errors found in the code. Please check the logs for details:\n\`\`\`$ERROR_MSG\`\`\`\"}" ${{ secrets.SLACK_WEBHOOK_URL }} fi - - name: Send Slack notification on failure - if: steps.pylint_check.outcome == 'failure' - run: | - ERROR_MSG=$(grep -E "E[0-9]+" pylint_report.txt) - curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"Critical linting errors found in the code. Please check the logs for details:\n\`\`\`$ERROR_MSG\`\`\`\"}" ${{ secrets.SLACK_WEBHOOK_URL }} + #- name: Send Slack notification on failure + # if: steps.pylint_check.outcome == 'failure' + # run: | + # ERROR_MSG=$(grep -E "E[0-9]+" pylint_report.txt) + # curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"Critical linting errors found in the code. Please check the logs for details:\n\`\`\`$ERROR_MSG\`\`\`\"}" ${{ secrets.SLACK_WEBHOOK_URL }} From 4d8406390980429450d51ab3f28724131dee9fc2 Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Fri, 7 Jun 2024 15:38:05 +0330 Subject: [PATCH 30/53] linting using intentional error --- .github/workflows/lint.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 532f38f74..6f9113805 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -47,8 +47,3 @@ jobs: curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"Critical linting errors found in the code. Please check the logs for details:\n\`\`\`$ERROR_MSG\`\`\`\"}" ${{ secrets.SLACK_WEBHOOK_URL }} fi - #- name: Send Slack notification on failure - # if: steps.pylint_check.outcome == 'failure' - # run: | - # ERROR_MSG=$(grep -E "E[0-9]+" pylint_report.txt) - # curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"Critical linting errors found in the code. Please check the logs for details:\n\`\`\`$ERROR_MSG\`\`\`\"}" ${{ secrets.SLACK_WEBHOOK_URL }} From dbbb4aa3937a201bf3b75a733d70b42de0e5892c Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Fri, 14 Jun 2024 19:35:04 +0330 Subject: [PATCH 31/53] Update CI.yml with original docker action --- .github/workflows/CI.yml | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 06277b35d..318aa79f0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -38,15 +38,30 @@ jobs: - name: Build with Gradle run: ./gradlew build - - name: Build & push Docker image - uses: mr-smithers-excellent/docker-build-push@v6 - with: - image: anoshrz/java_project - tags: latest - registry: docker.io - dockerfile: Dockerfile - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + + docker: + needs: build + runs-on: ubuntu-latest + + steps: + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Log in to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push Docker image + uses: docker/build-push-action@v3 + with: + context: . + push: true + tags: anoshrz/java_project:latest + + - name: Log out from Docker Hub + run: docker logout # NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html). # If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version. # From 6bc3285d2f3a7c205794ba5c8512b2008ee79c4b Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Fri, 14 Jun 2024 19:50:54 +0330 Subject: [PATCH 32/53] Update CI.yml --- .github/workflows/CI.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 318aa79f0..195504389 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -44,6 +44,10 @@ jobs: runs-on: ubuntu-latest steps: + + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 From d1d488fd69d2d1f3fab9a60561fbc9386f6845b2 Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Fri, 14 Jun 2024 20:22:04 +0330 Subject: [PATCH 33/53] Adding original slack action --- .github/workflows/lint.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 6f9113805..c7f76883d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -46,4 +46,26 @@ jobs: ERROR_MSG=$(grep -E "E[0-9]+" pylint_report.txt) curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"Critical linting errors found in the code. Please check the logs for details:\n\`\`\`$ERROR_MSG\`\`\`\"}" ${{ secrets.SLACK_WEBHOOK_URL }} fi + - name: Using Slack action + - name: Send custom JSON data to Slack workflow + id: slack + uses: slackapi/slack-github-action@v1.26.0 + with: + # For posting a rich message using Block Kit + payload: | + { + "text": "GitHub Action build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}", + "blocks": [ + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "GitHub Action build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}" + } + } + ] + } + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK From 5dfbe9b9d1556da5d49cb87138622c48e2af25e0 Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Fri, 14 Jun 2024 20:23:45 +0330 Subject: [PATCH 34/53] using original actions --- .github/workflows/lint.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c7f76883d..42f069d8a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -46,9 +46,8 @@ jobs: ERROR_MSG=$(grep -E "E[0-9]+" pylint_report.txt) curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"Critical linting errors found in the code. Please check the logs for details:\n\`\`\`$ERROR_MSG\`\`\`\"}" ${{ secrets.SLACK_WEBHOOK_URL }} fi - - name: Using Slack action - - name: Send custom JSON data to Slack workflow + - name: Send custom JSON data to Slack workflow using original actions id: slack uses: slackapi/slack-github-action@v1.26.0 with: From 8cc428d6c9cb300674e38622b00530fbd9787cba Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Fri, 14 Jun 2024 20:38:28 +0330 Subject: [PATCH 35/53] Update lint.yml --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 42f069d8a..cf86b665f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -60,7 +60,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": "GitHub Action build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}" + "text": "Critical linting errors found in the code. Please check the logs for details:\n\`\`\`hvvlbj\`\`\`\" } } ] From bd012f0a49bc1d8a044da0dd87582220014b2378 Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Fri, 14 Jun 2024 20:40:15 +0330 Subject: [PATCH 36/53] Update lint.yml --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index cf86b665f..e4e1201ab 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -60,7 +60,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": "Critical linting errors found in the code. Please check the logs for details:\n\`\`\`hvvlbj\`\`\`\" + "text": "Critical linting errors found in the code. Please check the logs for details" } } ] From 5fe4ead3ec8638994a289b03bff5a626e122d8e7 Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Fri, 14 Jun 2024 21:14:12 +0330 Subject: [PATCH 37/53] Update lint.yml --- .github/workflows/lint.yml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e4e1201ab..9ef88d2d6 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -37,15 +37,12 @@ jobs: RATING=$(grep -oP "Your code has been rated at \K[0-9\.]+/[0-9\.]+" pylint_report.txt) curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"Your code rating of your recent push is: ${RATING}\"}" ${{ secrets.SLACK_WEBHOOK_URL }} - - name: Check for critical pylint errors - id: pylint_check + - name: Extract error message + id: extract_error run: | - - if grep -E "E[0-9]+" pylint_report.txt; then - echo "Critical pylint errors found in the code. Please check pylint_report.txt for details." - ERROR_MSG=$(grep -E "E[0-9]+" pylint_report.txt) - curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"Critical linting errors found in the code. Please check the logs for details:\n\`\`\`$ERROR_MSG\`\`\`\"}" ${{ secrets.SLACK_WEBHOOK_URL }} - fi + ERROR_MSG=$(grep -E "E[0-9]+" pylint_report.txt) + echo "ERROR_MSG=${ERROR_MSG}" >> $GITHUB_ENV + - name: Send custom JSON data to Slack workflow using original actions id: slack @@ -54,13 +51,13 @@ jobs: # For posting a rich message using Block Kit payload: | { - "text": "GitHub Action build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}", + "text": "Pylint score", "blocks": [ { "type": "section", "text": { "type": "mrkdwn", - "text": "Critical linting errors found in the code. Please check the logs for details" + "text": "Pylint found the following errors:\n```${{ env.ERROR_MSG }}```" } } ] From 94dd28f5f58f3e350592b56d9759816c71d9512d Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Fri, 14 Jun 2024 21:28:25 +0330 Subject: [PATCH 38/53] Update lint.yml --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9ef88d2d6..baf0a41cd 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -41,7 +41,7 @@ jobs: id: extract_error run: | ERROR_MSG=$(grep -E "E[0-9]+" pylint_report.txt) - echo "ERROR_MSG=${ERROR_MSG}" >> $GITHUB_ENV + #echo "ERROR_MSG=${ERROR_MSG}" >> $GITHUB_ENV - name: Send custom JSON data to Slack workflow using original actions From fbf8cca9de379eaf9375859058f190b85af09e3a Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Fri, 14 Jun 2024 21:53:57 +0330 Subject: [PATCH 39/53] Update lint.yml --- .github/workflows/lint.yml | 41 +++++++------------------------------- 1 file changed, 7 insertions(+), 34 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index baf0a41cd..74f20fcec 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,32 +1,25 @@ name: Lint and Format Code - on: push: paths: - 'src/python/**' - '.github/workflows/lint.yml' - jobs: lint-and-format: runs-on: ubuntu-latest - steps: - name: Checkout code uses: actions/checkout@v2 - - name: Set up Python uses: actions/setup-python@v2 with: python-version: '3.8' - - name: Install dependencies run: | python -m pip install --upgrade pip pip install black pylint - - name: Format code with Black run: black . - - name: Run pylint id: lint continue-on-error: true @@ -37,31 +30,11 @@ jobs: RATING=$(grep -oP "Your code has been rated at \K[0-9\.]+/[0-9\.]+" pylint_report.txt) curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"Your code rating of your recent push is: ${RATING}\"}" ${{ secrets.SLACK_WEBHOOK_URL }} - - name: Extract error message - id: extract_error + - name: Check for critical pylint errors + id: pylint_check run: | - ERROR_MSG=$(grep -E "E[0-9]+" pylint_report.txt) - #echo "ERROR_MSG=${ERROR_MSG}" >> $GITHUB_ENV - - - - name: Send custom JSON data to Slack workflow using original actions - id: slack - uses: slackapi/slack-github-action@v1.26.0 - with: - # For posting a rich message using Block Kit - payload: | - { - "text": "Pylint score", - "blocks": [ - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "Pylint found the following errors:\n```${{ env.ERROR_MSG }}```" - } - } - ] - } - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK + if grep -E "E[0-9]+" pylint_report.txt; then + echo "Critical pylint errors found in the code. Please check pylint_report.txt for details." + ERROR_MSG=$(grep -E "E[0-9]+" pylint_report.txt) + curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"Critical linting errors found in the code. Please check the logs for details:\n\`\`\`$ERROR_MSG\`\`\`\"}" ${{ secrets.SLACK_WEBHOOK_URL }} + fi From 1d80a7933a977ad0e84af917763a60beb206c455 Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Sat, 15 Jun 2024 15:14:47 +0330 Subject: [PATCH 40/53] Create lint_reusable.yml --- .github/workflows/lint_reusable.yml | 41 +++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/lint_reusable.yml diff --git a/.github/workflows/lint_reusable.yml b/.github/workflows/lint_reusable.yml new file mode 100644 index 000000000..d4d20f382 --- /dev/null +++ b/.github/workflows/lint_reusable.yml @@ -0,0 +1,41 @@ +name: Linting to Slack +on: + workflow_call: + secrets: + SLACK_WEBHOOK_URL: + required: true + +jobs: + lint-and-format: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.8' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install black pylint + - name: Format code with Black + run: black . + - name: Run pylint + id: lint + continue-on-error: true + run: pylint ./**/**.py > pylint_report.txt + + - name: Send code rating to slack + run: | + RATING=$(grep -oP "Your code has been rated at \K[0-9\.]+/[0-9\.]+" pylint_report.txt) + curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"Your code rating of your recent push is: ${RATING}\"}" ${{ secrets.SLACK_WEBHOOK_URL }} + + - name: Check for critical pylint errors + id: pylint_check + run: | + if grep -E "E[0-9]+" pylint_report.txt; then + echo "Critical pylint errors found in the code. Please check pylint_report.txt for details." + ERROR_MSG=$(grep -E "E[0-9]+" pylint_report.txt) + curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"Critical linting errors found in the code. Please check the logs for details:\n\`\`\`$ERROR_MSG\`\`\`\"}" ${{ secrets.SLACK_WEBHOOK_URL }} + fi From 736aedd34a4a37ab0f07f8ce684091cae31376b4 Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Sat, 15 Jun 2024 15:30:53 +0330 Subject: [PATCH 41/53] Update lint.yml --- .github/workflows/lint.yml | 34 +++------------------------------- 1 file changed, 3 insertions(+), 31 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 74f20fcec..8e9ec9382 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,35 +6,7 @@ on: - '.github/workflows/lint.yml' jobs: lint-and-format: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.8' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install black pylint - - name: Format code with Black - run: black . - - name: Run pylint - id: lint - continue-on-error: true - run: pylint ./**/**.py > pylint_report.txt + uses: anosh-ar/FAPS_Github_Action.github/workflows/lint_reusable.yml@main + secrets: + SLACK_WEBHOOK_URL: ${{secrets.SLACK_WEBHOOK_URL}} - - name: Send code rating to slack - run: | - RATING=$(grep -oP "Your code has been rated at \K[0-9\.]+/[0-9\.]+" pylint_report.txt) - curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"Your code rating of your recent push is: ${RATING}\"}" ${{ secrets.SLACK_WEBHOOK_URL }} - - - name: Check for critical pylint errors - id: pylint_check - run: | - if grep -E "E[0-9]+" pylint_report.txt; then - echo "Critical pylint errors found in the code. Please check pylint_report.txt for details." - ERROR_MSG=$(grep -E "E[0-9]+" pylint_report.txt) - curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"Critical linting errors found in the code. Please check the logs for details:\n\`\`\`$ERROR_MSG\`\`\`\"}" ${{ secrets.SLACK_WEBHOOK_URL }} - fi From bfaa406cc9adddc84a6ca050ba16e83b8cd8a9cf Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Sat, 15 Jun 2024 15:32:39 +0330 Subject: [PATCH 42/53] Update lint.yml --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8e9ec9382..3080a1b55 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,7 +6,7 @@ on: - '.github/workflows/lint.yml' jobs: lint-and-format: - uses: anosh-ar/FAPS_Github_Action.github/workflows/lint_reusable.yml@main + uses: anosh-ar/FAPS_Github_Action/.github/workflows/lint_reusable.yml@main secrets: SLACK_WEBHOOK_URL: ${{secrets.SLACK_WEBHOOK_URL}} From 11b0fbc7e10fdf9d67019a46954912ba70d0e7af Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Sat, 15 Jun 2024 15:33:43 +0330 Subject: [PATCH 43/53] Update lint.yml --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3080a1b55..048a66bb5 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,7 +6,7 @@ on: - '.github/workflows/lint.yml' jobs: lint-and-format: - uses: anosh-ar/FAPS_Github_Action/.github/workflows/lint_reusable.yml@main + uses: anosh-ar/FAPS_Github_Action/.github/workflows/lint_reusable.yml@master secrets: SLACK_WEBHOOK_URL: ${{secrets.SLACK_WEBHOOK_URL}} From 29fef6ad496ad89b4ecdd692a50dc9c4faa16924 Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Sat, 15 Jun 2024 15:35:13 +0330 Subject: [PATCH 44/53] Update lint_reusable.yml --- .github/workflows/lint_reusable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint_reusable.yml b/.github/workflows/lint_reusable.yml index d4d20f382..7cc39f7f4 100644 --- a/.github/workflows/lint_reusable.yml +++ b/.github/workflows/lint_reusable.yml @@ -1,4 +1,4 @@ -name: Linting to Slack +name: Reusable Linting to Slack on: workflow_call: secrets: From fd45d23b61e17327df1041fcba21110aefe06935 Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Tue, 16 Jul 2024 16:23:16 +0330 Subject: [PATCH 45/53] Create greetings --- .github/workflows/greetings | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/workflows/greetings diff --git a/.github/workflows/greetings b/.github/workflows/greetings new file mode 100644 index 000000000..3f892a703 --- /dev/null +++ b/.github/workflows/greetings @@ -0,0 +1,13 @@ +name: Greetings + +on: [pull_request, issues] + +jobs: + greeting: + runs-on: ubuntu-latest + steps: + - uses: actions/first-interaction@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + issue-message: 'Welcome on your first issue' + pr-message: 'Message that will be displayed on users first pr' From 00a6b8daf43a33e49d20d23e761fa08ac7e656df Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Sun, 18 Aug 2024 23:03:43 +0200 Subject: [PATCH 46/53] run on ARC local host --- .github/workflows/lint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 048a66bb5..0b9b61c17 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,6 +6,7 @@ on: - '.github/workflows/lint.yml' jobs: lint-and-format: + runs-on: arc-runner-set uses: anosh-ar/FAPS_Github_Action/.github/workflows/lint_reusable.yml@master secrets: SLACK_WEBHOOK_URL: ${{secrets.SLACK_WEBHOOK_URL}} From 0fd80997d5b9b2a7f51a48765c89d0805ad8fe67 Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Sun, 18 Aug 2024 23:07:02 +0200 Subject: [PATCH 47/53] reverted --- .github/workflows/lint.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0b9b61c17..048a66bb5 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,7 +6,6 @@ on: - '.github/workflows/lint.yml' jobs: lint-and-format: - runs-on: arc-runner-set uses: anosh-ar/FAPS_Github_Action/.github/workflows/lint_reusable.yml@master secrets: SLACK_WEBHOOK_URL: ${{secrets.SLACK_WEBHOOK_URL}} From fdf16914f6c4760c08698eceab10ed5362e0f277 Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Sun, 18 Aug 2024 23:14:58 +0200 Subject: [PATCH 48/53] run on ARC local host --- .github/workflows/lint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 048a66bb5..7a8c7cbed 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,6 +7,7 @@ on: jobs: lint-and-format: uses: anosh-ar/FAPS_Github_Action/.github/workflows/lint_reusable.yml@master + runs-on: arc-runner-set secrets: SLACK_WEBHOOK_URL: ${{secrets.SLACK_WEBHOOK_URL}} From a34bf7df53220a972181530c961fc75366be22ec Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Sun, 18 Aug 2024 23:16:32 +0200 Subject: [PATCH 49/53] run on ARC local host --- .github/workflows/lint.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 7a8c7cbed..ac93b1388 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,7 +7,9 @@ on: jobs: lint-and-format: uses: anosh-ar/FAPS_Github_Action/.github/workflows/lint_reusable.yml@master - runs-on: arc-runner-set + runs-on: self-hosted + labels: + - arc-runner-set secrets: SLACK_WEBHOOK_URL: ${{secrets.SLACK_WEBHOOK_URL}} From 905ad31054a8e4ac04e15f6e795aadb073500031 Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Sun, 18 Aug 2024 23:32:44 +0200 Subject: [PATCH 50/53] Update lint.yml --- .github/workflows/lint.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ac93b1388..7a8c7cbed 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,9 +7,7 @@ on: jobs: lint-and-format: uses: anosh-ar/FAPS_Github_Action/.github/workflows/lint_reusable.yml@master - runs-on: self-hosted - labels: - - arc-runner-set + runs-on: arc-runner-set secrets: SLACK_WEBHOOK_URL: ${{secrets.SLACK_WEBHOOK_URL}} From d63176fff082297ef0f262584806b7a1e9ef768b Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Sun, 18 Aug 2024 23:33:49 +0200 Subject: [PATCH 51/53] Update lint.yml --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 7a8c7cbed..0b9b61c17 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,8 +6,8 @@ on: - '.github/workflows/lint.yml' jobs: lint-and-format: - uses: anosh-ar/FAPS_Github_Action/.github/workflows/lint_reusable.yml@master runs-on: arc-runner-set + uses: anosh-ar/FAPS_Github_Action/.github/workflows/lint_reusable.yml@master secrets: SLACK_WEBHOOK_URL: ${{secrets.SLACK_WEBHOOK_URL}} From b8993f0ad4c63cbe62686e0268d48e85d070cc73 Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Sun, 18 Aug 2024 23:35:12 +0200 Subject: [PATCH 52/53] Update lint.yml --- .github/workflows/lint.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0b9b61c17..048a66bb5 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,7 +6,6 @@ on: - '.github/workflows/lint.yml' jobs: lint-and-format: - runs-on: arc-runner-set uses: anosh-ar/FAPS_Github_Action/.github/workflows/lint_reusable.yml@master secrets: SLACK_WEBHOOK_URL: ${{secrets.SLACK_WEBHOOK_URL}} From 41852cd6866ef11f6ba08a35dbd05d8987212cb9 Mon Sep 17 00:00:00 2001 From: anosh-ar <115220756+anosh-ar@users.noreply.github.com> Date: Sun, 18 Aug 2024 23:36:56 +0200 Subject: [PATCH 53/53] run on ARC local host --- .github/workflows/lint_reusable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint_reusable.yml b/.github/workflows/lint_reusable.yml index 7cc39f7f4..47b4e1bb2 100644 --- a/.github/workflows/lint_reusable.yml +++ b/.github/workflows/lint_reusable.yml @@ -7,7 +7,7 @@ on: jobs: lint-and-format: - runs-on: ubuntu-latest + runs-on: arc-runner-set steps: - name: Checkout code uses: actions/checkout@v2