Skip to content

Commit

Permalink
📝 Update .gitignore and enhance PR description formatting
Browse files Browse the repository at this point in the history
🔍 This commit includes the following changes:

- 🚫 Added `.idea/` to .gitignore for better IDE-specific exclusions
- 🧹 Improved formatting in .gitignore for clarity
- 🎨 Enhanced PR description formatting in index.js:
  - Added a clear "AUTO DESCRIPTION" header
  - Included a link to the auto-pr-description-action repository
  - Adjusted the logic for handling existing descriptions
- 🔧 These updates improve project organization and make auto-generated PR descriptions more informative and visually distinct
  • Loading branch information
yuri-val committed Nov 8, 2024
1 parent 998ecd1 commit 369e074
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
.idea/

node_modules/

diff/
6 changes: 4 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34578,9 +34578,11 @@ async function updatePRDescription(githubToken, context, prNumber, generatedDesc
});

let currentDescription = pullRequest.body || '';
let newDescription = `---\n${generatedDescription}`;
let newDescription = `> \`AUTO DESCRIPTION\`
> by [auto-pr-description-action](https://github.com/yuri-val/auto-pr-description-action)
\n${generatedDescription}`;

if (currentDescription && !currentDescription.startsWith('---\n')) {
if (currentDescription && !currentDescription.startsWith('> `AUTO DESCRIPTION`')) {
console.log('Creating comment with original description...');
await octokit.rest.issues.createComment({
owner: context.repo.owner,
Expand Down
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,11 @@ async function updatePRDescription(githubToken, context, prNumber, generatedDesc
});

let currentDescription = pullRequest.body || '';
let newDescription = `---\n${generatedDescription}`;
let newDescription = `> \`AUTO DESCRIPTION\`
> by [auto-pr-description-action](https://github.com/yuri-val/auto-pr-description-action)
\n${generatedDescription}`;

if (currentDescription && !currentDescription.startsWith('---\n')) {
if (currentDescription && !currentDescription.startsWith('> `AUTO DESCRIPTION`')) {
console.log('Creating comment with original description...');
await octokit.rest.issues.createComment({
owner: context.repo.owner,
Expand Down

0 comments on commit 369e074

Please sign in to comment.